Slimsy width and height
# help-with-other
c
A colleague is saying that they always add hardcoded width and height attributes to slimsy-picture tag. While in a traditional simple img tag scenario, it makes sense, to prevent layout shift on load, I'd like to know what's going on in the browser with the way Slimsy does it as CSS is also valid for layout as I understand it. Whenever I've set the "ImageDimensions" to "true" in appsettings, it puts out width="0" height="0" in the img tag section, so I don't see the point of that. Where does Slimsy get the width and height values from. I'm guessing if you're going to use them then they need to be dynamic and not hard coded, to cope with responsive sizing. I just wondered if anyone has a deeper understanding of what's going on, why and best practice 🙂
5 Views