eximagination.templatetags package¶
Submodules¶
eximagination.templatetags.eximaginate module¶
Copy an external image locally.
To just output the absolute url to the thumbnail:
{% load eximaginate %} <img src="{{ MEDIA_URL }} {% eximaginate 'http://www.google.com/intl/en/images/logo.gif' %}">
To put the the downloaded image URL on the context instead of just rendering the relative url, finish the tag with
as [context_var_name]
:{% load eximaginate thumbnail %}
- {% eximaginate ‘http://www.google.com/intl/en/images/logo.gif‘
- as original %}
<img src=”{% thumbnail original 100x100 %}”>
Eximagination will automatically add “ei_width” and “ei_height” variables to the content - those are the original width and height values of the obtained image.
TODO: Implement force_update feature (some extra tokens parsing)