I know this essentially does the trick, however I was hoping I could apply a custom transform to all image assets if one hasn't been defined by the user.

The problem I have is trying to convey the importance of defining image transforms to my "less-than-savvi" clients.

So, as a fallback I'd like to know if I can query any images and apply an image transform. I feel like this might be a step in the right direction, but not sure what to do next:

{{ include(template_from_string(entry.body)|raw) }}



I wrote a plugin called Retcon which is able to apply bulk image transforms to images in HTML/Redactor content:

{{ entry.body|retconTransform({ width : 1024 }) }}
{{ entry.body|retconTransform(myAwesomeTransform) }}

There's currently no way to tell Retcon to only transform images that hasn't already been transformed, though – so this might not be exactly what you're looking for.

  • Very nice, thanks Mats. Apologies for the late reply too! Jul 24 '16 at 23:05

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.