Is there a way to add scrset to an image without specifying the original width in the sizes attribute?
For example, I have this image:
<img src="image.png" srcset="image_XXS.png 320w, image_XS.png 480w, image.png 481w" sizes="100vw">
The original size is 555px. It uses the original image on viewports wider than 480px, as expected, but stretches it above 555px. I found out that if I add the original width to the sizes attribute
<img src="image.png" srcset="image_XXS.png 320w, image_XS.png 480w, image.png 481w" sizes="(min-width: 555px) 555px, 100vw">
or wrap it in a div with a fixed width, it works.
Can I do it without knowing the original size?
Thanks in advance!