Login

Image inlining template tag example

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

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

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="lala" %}
{% 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="lala" %}
{% embedded_img src="{{MEDIA_URL}}upload/images/001.jpg" %}

More like this

Comments

Please login first before commenting.