Retrospectively creating Image varieties


(Steven) #1

Hi,

We have several folders containing hundreds of Standard pages with Image assets located within them.

When the image is created, we trigger a couple of image varieties. Now we want to add two more varieties and I’m struggling to set up my trigger.

How can I configure my trigger to create a new image variety for all currently live images within “Folder 2023”?

Any help is much appreciated.
Thanks
Steven




(Bmasters) #2

Hi Steven,
My first instinct is to try creating a JSAPI and use the setAttribute method to do it for you. Although I’m unsure if image varieties are included in that.
See: https://matrix.squiz.net/manuals/web-services/chapters/javascript-api

Alternatively (very hacky), you could create a new metadata field, apply it to the whole site.
Then update your Trigger event to look for this new metadata field being updated, and then create the image varieties.
And then update the metadata field at your root asset and cascade the change down the tree.
Depending on the size of your site it might take a while.
Once you’ve confirmed it has worked, remove the metadata field altogether, and revert the trigger back to asset creation.


(Steven) #3

Brilliant thanks @tinders,

I went with the metadata option as it didnt require me to learn about a whole new topic :blush:

Worked a treat.

thanks
Steven


#4

Hello, for future reference, you were looking for trigger batching screen of the trigger manager.
eg if you were using Asset Created event to trigger, you simulate Asset Created event on selected assets using the batching screen.

https://docs.squiz.net/matrix/version/latest/features/configuration-assets/triggers/trigger-manager.html#batching