For example: this gif has 1,53MB in the network tab .
The problem is that the same 1,53MB size is served across all devices. Inspecting the markup, we see that the srcset has a lot of different sizes in there:
Yes @antoine.gilbert explained this once to me a bit and I investigated a different image than these. Though from these images that you've sent to me in this thread I can see they are being served at different sizes.
Which makes me think the issue is coming from Gatsby image as you said, which I know does something similar to imgix in it's compression and caching of images. So this double compression is probably what's causing your issues.
I would recommend when working with images coming from imgix that you use the imgix-react plugin instead, this will give you control of you images without the double compression:
Thanks. I am not sure I understand how to implement imgix correctly. I read this blog post and also the documentation here and it seems it will regenerate all images again? We dont need to do that because they are already processed by prismic, right?
Our query already give us a fluid.srcSet that has all srcset sizes as the examples above, why would we need imgix?
If you can give me an example using gatsby, that would be awesome.
Hey @rootdev, gatsby-imagedoesn't support gif resizing. So, going for using Imgix for all of your images, gifs, etc., is the way to go. It allows you to have a lot of customization for your images and because, as Phil said, having two compression processes at the same time it's not ideal.