width descriptors
Is it fine if i dont specify a width descriptor for images in img srcset if I have only one size
4 Replies
I only remember Kevin telling us to set the height to 100%,im not sure if it was height or width, but one of those should always be set to 100%, it avoid weird resizing issues
images should have a responsive feature which we gain by adding max-width:100%, height:auto;
That is not what I mean. In srcset attributes you can specify a width descriptor to "help" the browser to decide which image is better to load
Like in <img srcset="/mdn-logo-wide.png 1280w" />
But I wonder if I should always specify one
why bother if there's only one image though?
just use src