Stop page jumping while images load
问题 I'm building a CSS grid layout in PHP/HTML5 for displaying mainly images with text and sometimes in combination with videos (not used in this example). One thing still annoys me is the page jumping while images are loading. To avoid that the img tag should know either threw CSS or otherwise what the ratio is beforehand, most of the images used have a 1:1,414 ratio but there are exceptions so using just one ratio wouldn't work. Adding width and height on each img tag didn't work either. I'm