Do eager transformations get regenerated if used from a named transformation that has been modified?

Options
pludlow
pludlow Member Posts: 17
edited April 2023 in Developer APIs

If I create a named transformation that is used as an eager transformation in an upload preset, what happens when the configuration for the named transformation changes?

Does the updated transformation get re-generated on-the-fly the first time the transformation is accessed after the config change, or does Cloudinary not recognize that the settings may have changed and a purge would be needed of the old transformations made by the prior out-of-date configuration?

For example let's say I make a named transformation called t_example that changes the width of an image to w_100. This is an eager transformation for uploads that has run for 6 months. After 6 months we realize that the transformation should be updated to w_300. New uploads would generate eager transformations at that size, but anything uploaded before would still be 100 px. The URL called is using the named transformation, so when I access a URL with the transformation made before the change, would the image be 100 px, or would Cloudinary make a new version on-the-fly at 300 px?

Best Answer

  • tia
    tia Member, Cloudinary Staff Posts: 24
    Answer ✓
    Options

    Hi Phil, 

    Thanks for reaching out. 

    If you update a named transformation from the UI, and if there are fewer than 1000 existing derived already using that named transformation, those assets will be automatically invalidated and the next time they are requested, they will be delivered with the updated definition of the named transformation. If there are greater than 1000 derived, those assets will not be automatically invalidated. You will need to contact support to do that for you.

    If you update the named transformation via the API, the invalidation will not be done automatically. So you will need to invalidate those derived.

    You can reference the documentation on named transformations here:

    https://cloudinary.com/documentation/image_transformations#named_transformations

    Pay special attention to the notes highlighted in the blue box.

    Named transformations aren't intended to be updated. We usually recommend either creating a brand new named transformation or using dynamic ones instead.

    I hope this helps. If you have any questions, do not hesitate to ask.

    Kind regards, 

    Tia

Answers

  • pludlow
    pludlow Member Posts: 17
    Options

    Thank you for the information, that is helpful and useful as we configure our upload presets and named transformations.

  • tia
    tia Member, Cloudinary Staff Posts: 24
    Options

    Hi Phil,

    My pleasure 😊 We're here when you need anything.

    Kind regards,

    Tia