sorl-thumbnail icon indicating copy to clipboard operation
sorl-thumbnail copied to clipboard

Multi-resolution images broken (Regression from 12.3 -> 12.4.1)

Open wjakob opened this issue 6 years ago • 0 comments

Hi,

I'm using sorl-thumbnail to generate responsive thumbails in templates, e.g.

{% thumbnail item.thumbnail "160x160" as im %}
<img srcset="{{ im.url }} 1x, {{ im.url|resolution:"2x" }} 2x, {{ im.url|resolution:"4x" }} 4x">
{% endthumbnail %}

where THUMBNAIL_ALTERNATIVE_RESOLUTIONS = [2, 4].

After upgrading to the latest sorl-thumbail, I noticed that higher-resolution thumbnails are no longer generated, and all url evaluations return the same address (despite the fact that multiple resolutions were created are cached on Amazon S3).

<img srcset="//rgl.s3.eu-central-1.amazonaws.com/media/cache/98/05/98050aeaca45cbc1ba28f0945fcaf3fe.jpg 1x, //rgl.s3.eu-central-1.amazonaws.com/media/cache/98/05/98050aeaca45cbc1ba28f0945fcaf3fe.jpg 2x, //rgl.s3.eu-central-1.amazonaws.com/media/cache/98/05/98050aeaca45cbc1ba28f0945fcaf3fe.jpg 4x">

The discrepancy was introduced between version 12.3 (works) and 12.4.1 (broken).

wjakob avatar Oct 19 '18 10:10 wjakob