Reputation: 17
I have a little question about the image tag of wagtail.
Is it possible to apply the image tag twice time on the same image in a concatenated manner?
For example:
{% image photo width-1500 as photo_scaled %}
{% image photo_scaled fill-400x300 as image %}
Thanks in advance
Upvotes: 0
Views: 44
Reputation: 5176
When you use the template tag image
(eg. {% image photo width-1500 as photo_scaled %}
), you are generating an image rendition, not a new image. So you cannot then generate a new rendition from a rendition.
A “Rendition” contains the information specific to the way you’ve requested to format the image using the resize-rule, i.e. dimensions and source URL. Image Tag Docs
However, in your question above, fill-400x300
will produce the exact same rendition size/compression - irrelevant to the input image.
Upvotes: 1