Front end not using updated image constraints

Hello,

My team is currently in the process of creating our first Prismic/Nuxt web build. We have noticed that when adding or updating sizing constraints on image fields, these changes are not reflected on the front-end.

e.g. if an image field previously had no constraints and we set it now to 100x100, there will be no imgix compression at all, or if an image was set to 100x100 before and we now want to use 100x50, it will remain at 100x100.

The only way I can see to get images to use the new constraints is to re-select the image within the CMS and re-publish.

Is this expected? Is there a way to programatically update the image fields to use the new image constraints?

Thanks,
Jarod

Hello @jarod

Welcome to the Prismic community, and thanks for reaching out to us.

This is expected behavior for the moment. You need to re-select images and re-publish those. I'll create an issue in our issue -tracker to improve it.

Thanks,
Priyanka

Ok, thanks for clarifying Priyanka.

We're about to do a large content migration from a different CMS into Prismic (~1000 entries). So if any image constraints change after the import, the way it is now we would have to click into every single image instance (~10k images), find the image again in the media library, then re-build the site for every entry? Feels like a pretty big issue...

Thanks for adding it to your tracker, would be good to set a decent priority on this one.

Cheers
Jarod

1 Like

Hello @jarod

I can explain a use case that explained how to add responsive views for an Image field in all documents of the same Custom Type.

  1. First, prepare Custom types in Prismic editor with all responsive views for your images.
  2. Prepare the JSON files, that you want to import, with responsive views.
  3. Import the documents.

It will add all images with responsive views in the Prismic editor. You shouldn't need to reselect them.

Here is an example also: Import a Bulk Update - Prismic

Thanks,
Priyanka