djangosnippets.org: Latest snippets tagged with 'base64'http://djangosnippets.org/tags/base64/2020-01-28T21:17:43.951410-06:00Read image url as base64
2020-01-28T21:17:43.951410-06:00agusmakmunhttp://djangosnippets.org/snippets/10763/<p>Read the image url as base64 in django, this snippet usefull if you using the <code>django-easy-pdf</code> to solve this issue https://github.com/nigma/django-easy-pdf/issues/53</p>
<p>Usage example:</p>
<p><code><img src="{{ profile.photo.url|read_image_as_base64 }}"></code></p>
Freely redistributableImage as base64 in django
2017-08-04T03:58:03.628132-05:00agusmakmunhttp://djangosnippets.org/snippets/10616/<p>Easy way to get base64 for the image to display in the template, eg: <code><img src="{{ post.get_cover_base64 }}"></code></p>
Freely redistributableImage inlining template tag lib
2010-11-17T08:16:43.444488-06:00rbeckhttp://djangosnippets.org/snippets/2268/<p>A custom templatetag for inlining image in the browser.
The principe is to base64 encode the image and avoid a http request.
There is a cache handling, you just have to specify a writable directory.
</p>
<p>An example of the utilisation (template part): <a href="http://djangosnippets.org/snippets/2267/">http://djangosnippets.org/snippets/2267/</a>
</p>
<p>The explication on <a href="http://raphaelbeck.wordpress.com/2010/11/14/make-inline-images-to-improve-performance-with-django-template-tags/">http://raphaelbeck.wordpress.com/2010/11/14/make-inline-images-to-improve-performance-with-django-template-tags/</a>
</p>
Freely redistributableImage inlining template tag example
2010-11-17T08:10:58.284488-06:00rbeckhttp://djangosnippets.org/snippets/2267/<p>The example of the Image inlining template tag lib which inline images in the browser instead of making an Http request.
</p>
<p>The lib is available at : <a href="http://djangosnippets.org/snippets/2268/">http://djangosnippets.org/snippets/2268/</a>
</p>
Freely redistributableImage inlining template tag example
2010-11-17T08:10:26.244488-06:00rbeckhttp://djangosnippets.org/snippets/2266/<p>The example of the Image inlining template tag lib which inline images in the browser instead of making an Http request.
</p>
Freely redistributableBase64Field: base64 encoding field for storing binary data in Django TextFields
2009-08-05T15:04:04.118561-05:00bikeshedderhttp://djangosnippets.org/snippets/1669/<p>This Base64Field class can be used as an alternative to a BlobField, which is not supported by Django out of the box.</p>
<p>The base64 encoded data can be accessed by appending _base64 to the field name. This is especially handy when using this field for sending eMails with attachment which …</p>
Freely redistributablebase64 encoding/decoding property for storing binary data in Django TextFields.
2009-06-26T11:21:25.547527-05:00bikeshedderhttp://djangosnippets.org/snippets/1597/<p>This is possibly the simplest solution for storing binary data in a TextField.</p>
Freely redistributable