Roots Discourse

Dynamic Images Sizes

Hi is there any known workflow to work with dynamic generated images like with timber
https://timber.github.io/docs/guides/cookbook-images/

An Example from Timber that i would like to use with blade:

I am working with an acf component approach where i have a lot of different image sizes that also sometimes need to be cropped.

Thanks for your help!

We made a wordpress plugin for exactly this: ResponsivePics

Just pass the image id, image sizes and crops etc. in your template files and the plugin will resize them for you on the fly if the image is big enough.

In the 1.0.0-beta version we’re currently adding Action Scheduler for background processing the resizing of the images so your server won’t choke.

4 Likes

Wow, this is awesome! Have been using my own helper functions in conjunction with WP Retina 2x but this is so much cleaner… Thanks so much for sharing!!

1 Like

I used to do the same, but I didn’t like adding custom image sizes for every single upload.

You’re welcome! Still work in progress though, but nearly finished!

thank you so much! Been testing it - works like charme so far!