Yawd website

Articles Tagged sorl-thumbnail

  1. SEO-friendly image names with sorl-thumbnail and Django

    When working with Django, I tend to use sorl-thumbnail more and more. It is a quick & easy way of generating image thumbnails for your application. As a matter of fact, I use it on almost every img tag on my templates to ensure that user-upload images will fit the page layout. But the URLs that the application generates are of the form http://media.example.com/cache/9f/0c/9f0c98435b16bcea2b9ead87.jpg. Except for being unpretty, such URLs are SEO deal-killers.

    Posted on August 20th, 2012 by Pantelis Petridis
  2. Fix IndexError/KeyError in sorl.thumbnail.engines.pil_engine._orientation with PIL

    PIL sometimes fails to read an image's exif header. Sorl-thumbnail v11.12 does not correctly handle all the exceptions that the PIL library can generate resulting in the error below:
    Posted on April 18th, 2012 by Pantelis Petridis