Login

Image inlining template tag example

Author:
rbeck
Posted:
November 17, 2010
Language:
HTML/template
Version:
1.2
Tags:
tag image templatetag base64
Score:
1 (after 1 ratings)

The example of the Image inlining template tag lib which inline images in the browser instead of making an Http request.

The lib is available at : http://djangosnippets.org/snippets/2268/

1
2
3
4
5
6
7
{% load image_tags %}
{% embedded_img src="/media/images/002.gif" height="200px" width="200px" alt="{{my_var}}" %}
{% embedded_img src="{{MEDIA_URL}}upload/images/001.jpg" height="200px" width="200px" alt="001" %}
{% embedded_img src="upload/images/logo_corp_264.png" alt="corp" %}
{% embedded_img src="{{MEDIA_URL}}upload/images/001.jpg" width="200px" alt="lala" %}
{% embedded_img src="{{MEDIA_URL}}upload/images/001.jpg" height="200px" width="200px" alt="my image" %}
{% embedded_img src="{{MEDIA_URL}}upload/images/001.jpg" %}

More like this

  1. Image inlining template tag example by rbeck 4 years, 9 months ago
  2. Image inlining template tag lib by rbeck 4 years, 9 months ago
  3. group_by snippet separating grouped objects by iElectric 4 years, 7 months ago
  4. django image bundle template tag library by amitu 8 years, 2 months ago
  5. [UPDATE]Filter to resize a ImageField on demand + RATIO OPTION + CLEANUP by karlsberg 5 years ago

Comments

Please login first before commenting.