Pipit Cloudinary v1.2

Pipit Cloudinary v1.2 adds support for dyanmic variables and upload URLs.

Dynamic variables

You can now use dynamic variables inside the opts attribute. These are the variables you have access to inside the template:

<perch:content id="width" type="select" label="Image Width" options="200|w_200,400|w_400,600|w_600" suppress>
<perch:content id="height" type="select" label="Image Height" options="200|h_200,400|h_400,600|h_600" suppress>
<perch:content id="image" type="image" label="Image" filter="cloudinary" opts="f_auto,{width},{height}">

This gives you to option to allow the editors to control how images are manipulated. This can be particularly useful for controlling the cropping behaviour.

Upload URLs

While the filter was built with Cloudinary’s fetch URLs in mind, there are cases where it could be benefitial to programatically upload images directly to Cloudinary and only store the image URL in a regular text field in Perch. It is something I had to do for a few projects. The template filter can now add the same image transformation options to these URLs as long as it uses the same Cloudinary cloud name as the one you’ve set in your config file.