@RobVermeer
Posted
Solution looks good!
One best practise I would recommend, is to always add the width and height of the image to the img element. These should be the full size of the image (intrinsic size). Without these values the browser doesn't know what amount of space to reserve when downloading the image.
You can see this in action in for example Chrome, by opening the element inspector, go to network and disable cache and throttle with "Slow 3G". Then go to performance tab and reload, when page is full loaded, stop the measurement and hover over the screenshots to see the text moving from top to bottom when image loads in (you see a peak in the graph where is happens) =)
You can read more about this here https://web.dev/cls/ and https://developer.mozilla.org/en-US/docs/Web/HTML/Element/img
Marked as helpful