Images served from s3 bucket rather than CDN

Images added in the rich text field are sometimes randomly being served from an s3 bucket as opposed to the prismic CDN. On my side I can't see abnormalities in the images as they are using similar file formats and sizes, and removing/adding the image back into the field most times resolves the issue. For example the first 2 images here (https://wantimes.leoandlea.com/halloween_homemadesnack_for_dogs/) are both in the rich text field but one is being served from S3 and the other a CDN (https://images.prismic.io/leoandlea-blog/3d15298a-92af-470b-be01-d7c57f60db8b_halloween2.png?auto=compress,format & https://prismic-io.s3.amazonaws.com/leoandlea-blog/c2538310-2ae8-4998-8b82-69cb1510ba02_unnamed+(2).png)

Is there any reason why this might be happening?

Hi Vincent,

Welcome to the community!

This is the first time I've seen this issue, I'm going to investigate why this is happening, so thank you for providing all this information. Once I know more I'll get back to you.

Thanks.

Can you tell me when you originally uploaded the images that are appearing on the Amazon server, are they images that were uploaded a long time ago?

Thanks.

Hello Phil,

It was uploaded around a month ago, at the same time as other images without issue.

Hey Vincent,

In that case, I'm not really sure what the issue is here, so I've reported it as a bug to our team and hopefully, they'll find time to explore this. If/when they do find time they'll update you here.

Thanks.

This thread is being monitored as an open ticket in the internal Prismic issue tracker. The Prismic support team will update this post as we get more information from our dev team. If you have a similar use-case, you can ‘Flag’ this topic to reopen and add it here.

I am using next.js and slice machine. Images that are added to a RichText field do not use the Imgix functionality for compression (uses the url https://prismic-io.s3.amazonaws.com/repo/file.jpp). Whereas the image field type does (uses the url https://images.prismic.io/repo/file.jpp?auto=compress,format&rect=0,42,710,449&w=980&h=620).

Why is this so? Is there a way to change this?

This leaves open to CMS admins uploading large file sizes for images.

Hey James,

Welcome to the community!

This is a known issue and is being tracked here. It's is marked as an issue we will resolve when we overhaul the editor this year.

The workaround is to re-add the image as Vincent suggested above

Thanks.