Sorry I made a mistake, images dont’ have 100% width if CSS width is not set, they have the width set in img’s width attribute (on my laptop they were 100% width because attribute width was larger than my screen):
So why not set width and height attributes with the correct values (the one specified by the selected file size)? So that we don’t need to set corresponding CSS width each time?
There’s no point in having a bigger image than selected file size, except in specific cases where you need bigger image and don’t care about quality/blur (like some dim abstract background image), then you can set CSS width to 100% if you will.
I understand this is what is advised in this article: