Don't forget to replace "self.image" by your image field name from your model ex ( self.cover )
replace Product by your model name
works pretty well :)
Read the image url as base64 in django, this snippet usefull if you using the `django-easy-pdf` to solve this issue https://github.com/nigma/django-easy-pdf/issues/53
Usage example:
```
<img src="{{ profile.photo.url|read_image_as_base64 }}">
```
I've reimplemented the code I found somewhere on the web within my models file. The earlier version was incapable of converting all formats to JPG while this code converts all formats and compresses all of them successfully.
You need to have PILLOW installed for this to work.
I've reimplemented the code I found somewhere on the web within my models file. The earlier version was incapable of converting all formats to JPG while this code converts all formats and compresses all of them successfully.
txt2img tag shows on the web text as images, helping to avoid get indexed email address and some other information you don't want to be on search engines.
Usage:
`{{worker.email|txt2img:18|safe}}`
You only have to put the code in some of your models.py and to have django-fiber installed in your system. Every image uploaded using Fiber admin dialog will be automatically resized and thumbnailed. Or whatever you need to do with it.
PushPinImageField is a Django form field that is a sub-class of an ImageField. The field accepts an image to upload and based on certain settings, notably the size of the resulting image, the sizes and colors of 3 different borders, as well as the color of the push pin, a re-sized image is created with a colorized push pin in the top-center.
A live demo of the field as well as more detailed usage instructions are available as a [blog entry](http://www.robmisio.com/blog/2/).