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
skywizard
skywizard5mo ago
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
Smix
Smix5mo ago
images should have a responsive feature which we gain by adding max-width:100%, height:auto;
Pi, a future fluent jp speaker
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
Jochem
Jochem5mo ago
why bother if there's only one image though? just use src
Want results from more Discord servers?
Add your server