Giter Site home page Giter Site logo

Comments (3)

SmileyChris avatar SmileyChris commented on August 18, 2024

There's no need to specify the storage used in the template - that's behind-the-scenes data which a template shouldn't have to worry about.

If you're just interested in getting the url of the image, {{ obj.image.url }} will do it, of course. Is there something else I'm missing?

from easy-thumbnails.

sirex avatar sirex commented on August 18, 2024

My MEDIA_URL points to external server, that serves static files.

Also I have special storage for uploaded files, that are stored in /var/uploads/

When I use easy-thumbnails in template:
{% thumbnail item.image 100x100 %}

I getting '/static/image_file.jpg_100x100_g85.jpg' instead of '/uploads/image_file.jpg_100x100_g85.jpg'

Images from my field are stored in:
/var/uploads/...

But thumbnails goes to MEDIA_ROOT:
/myprojectdir/media/...

How can I tell easy-thumbnails to store thumbnails to same directory as described in imagefield's storage?

from easy-thumbnails.

SmileyChris avatar SmileyChris commented on August 18, 2024

Oh, right. There are two ways.

  1. Use the easy-thumbnail ThumbnailerImageField: http://github.com/SmileyChris/easy-thumbnails/blob/74fe238da3922a96b70773d5e9fc99425cecb69b/docs/usage.txt#L61
  2. Use the provided setting to change the default thumbnail storage location for your project: http://github.com/SmileyChris/easy-thumbnails/blob/master/docs/ref/settings.txt#L20

from easy-thumbnails.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.