12 of 13
Reserve space for media before it loads
Give images, videos, and embeds dimensions or an aspect ratio before they load. Reserve that space on the first render so nearby controls stay where people expect them.
Doaspect-ratio: 2 / 1 before load
Don’t0px reserved before load
Before you ship
- Disable cache, throttle the network, and reload. Keep the pointer over View details while the image starts loading and finishes rendering. Does the button stay under the pointer?
- Does the placeholder match the final crop at both narrow and wide widths?
- Does the same space remain reserved when the media request fails?