django-daguerre icon indicating copy to clipboard operation
django-daguerre copied to clipboard

Handle arbitrary URLs from the `{% adjust %}` template tag

Open harrislapiroff opened this issue 10 years ago • 0 comments

As was brought up in #65, Daguerre's {% adjust %} template tag currently does not accept arbitrary URLs to images for adjustment. E.g.,

{% adjust "http://www.wired.com/wp-content/uploads/2014/07/brain1.jpg" 'crop' width=200 height=200 %}

is invalid and will throw an exception. This is something Daguerre could theoretically support.

Pros

  • Other libraries like sorl support it.
  • It's something template designers may occasionally want to do.
  • It would be an easy way of relocating an image from an external server to the current application's media server.

Cons

  • It would encourage template designers to build sites that rely on the responsivity of external image sources.
  • Keeping track of whether an image has already been downloaded and adjusted based on a URL alone could prove tricky or computationally costly.

harrislapiroff avatar Nov 13 '14 20:11 harrislapiroff