Pipit Imgix v1.1
The Pipit Imgix template filter now supports dynamic variables and can also be enabled on development/staging environments.
Dynamic variables
Now you can use dynamic variables inside the imgix attributes. These are the variables you have access to inside the template:
<perch:content id="quality" type="select" label="Image Quality" options="90,80,70" suppress>
<perch:content id="image" type="image" label="Image" filter="imgix" imgix-opts="auto=format&q={quality}&w=800">
Or if you’re using individual attributes for each option:
<perch:content id="quality" type="select" label="Image Quality" options="90,80,70" suppress>
<perch:content id="image" type="image" label="Image" filter="imgix" imgix-q="{quality}" imgix-auto="format">
Development / Staging environments
By default, the filter does not rewrite your image URLs if you set your Perch production environment to development or staging:
define('PERCH_PRODUCTION_MODE', PERCH_DEVELOPMENT);
You have the option to enable it:
define('PIPIT_IMGIX_DEV', true);
Note that Imgix requires a publicly accessible URL to fetch the image from.
Also note that your Imgix subdomain is tied to a specific location, so unless you are using cloud storage a single subdomain won’t work across multiple environments.