Prismic Image compression goes from 4Mb to 180kb with huge quality loss

Hello,

I don't know why but on my current client project i have an issue with compression.

Here's the compressed file link :


And here's it without compression :

The difference is really huge.

I've never had a compression that big on any other projects.

Hello,

I would like to provide additional details regarding the image compression issue I'm experiencing on my current client project.

When my client uploads certain images, especially JPGs containing text, the auto-compression drastically reduces the quality. For example, one image went from 4MB to 180KB, making the text appear blurry and less readable.

Here's a summary of the issue:

  • Original Image Quality: 4MB (good quality, clear text)
  • Compressed Image Quality: 180KB (significant quality loss, blurry text)

We have tried the following solutions without success:

  • Converting the images to PNG and WEBP formats

The problem seems to be particularly noticeable with JPG images that contain text. This type of content seems to suffer more from the compression process compared to images without text.

Could you advise on the following:

  1. Is there a way to adjust the compression settings or disable automatic compression for specific images in Prismic?
  2. Would using a CDN to host the images externally be a viable solution?

Thank you for your assistance.

Best regards,

Hi Yanis,

Yes, you have some control over image quality. Our images are served through Imgix, and you can use any of the Imgix rendering API parameters, including quality:

Output Quality | Rendering API.

You can also disable compression and formatting if you like.

You can pass these parameters directly to PrismicNextImage (if using Next.js):

(You can also pass the parameters to the corresponding components in Nuxt and SvelteKit)

Sam