craft-snippets / Craft-image-toolbox

Craft CMS plugin that helps with the use of image transforms in templates.
Other
16 stars 0 forks source link

Auto generate all native image transforms #2

Open ballmannweber opened 3 years ago

ballmannweber commented 3 years ago

we are looking for craft to implement the feature to autogenerate ALL native manipulations/transformations either on command or when the images are uploaded. wouldn't autogeneration be a great feature for a future release?

piotrpog commented 3 years ago

I think it could be done if plugin triggered the visit of every existing subpage on the website.

That's actually the side effect of using Blitz plugin - Blitz "warm cache" functionality visits every element related page to refresh html cache and this also creates requests for images, which triggers transforms.

This does not however work with images existing on pages that are not related to any element - for example, pages set in routes.php file. Not sure how it would work with picture and srcset thought. I will look into it.

And by the way, Imager-x already offers such a feature, but i haven't tested it yet.