fear_matrix
fear_matrix

Reputation: 4960

How do i load images locally from a folder using thumbor

Suppose I have a image (sydney.jpg) which is at location /home/emirates/flight/static/images. In my thumbor configuration I have enabled the below

FILE_STORAGE_ROOT_PATH = '/home/emirates/flight/static/images'

But when I try to use it like so http://localhost:8888/unsafe/300x200/home/emirates/flight/static/images/sydney.jpg then it does not work. What seems to be the issue ?

Upvotes: 0

Views: 1356

Answers (2)

Webdevotion
Webdevotion

Reputation: 1243

Enable the file loader and give Thumbor the correct path:

FILE_LOADER_ROOT_PATH=/home/emirates/flight/static/images
LOADER=thumbor.loaders.file_loader

The correct URL to your local Thumbor server for that image should be:

http://localhost:8888/unsafe/300x200/sydney.jpg

Remark: in my experience Thumbor uses port 8000 by default. So you might want to check that. Your question does not specify the type of error your ran into.

Upvotes: 1

Codeboked
Codeboked

Reputation: 18

Good morning fear_matrix,

Have you tried this?

http://localhost:8888/home/emirates/flight/static/images/sydney.jpg

Thanks

Upvotes: 0

Related Questions