Description
Hi, just read your code, went through the same adventure as you writing an optimization endpoint and a image component for a painting gallery website (but going less further) so I want to give you a feedback from my thoughts, take it as is.
By reading your component I see that :
- the
sizes
prop can be overwritten for thepicture.img
by the developer. - the
sizes
prop can not be overwritten for thepicture.source
by the developer.
So, I am not sure if the overwrite it will be taking into account or not by the browser, I think this should be made sure of.
Plus, having a default sizes
of the viewport width looks dangerous to me. I imagine lot of users not knowing about that, then having a browser displaying a full-width image for what would have needed 90px, 200px width, defeating the purpose of the breakpoints. FYI for my site I never used a 100vw size and I always put the sizes
prop as mandatory, wanting to think about it each time I use it.