Build a product gallery that opens quickly and stays steady while photos load.
Reserve the frame
A storefront feels unstable when the purchase button moves as an image arrives. Give the image its intrinsic dimensions or reserve its aspect ratio in CSS. Decide whether the catalogue should crop to a uniform frame or show the entire product.
Send a fitting size
Export several widths and use srcset with a sizes value that matches the layout. A two-column mobile catalogue rarely needs the same image as a full-width product gallery. Keep the largest image available for the detailed view.
Check the first screen
Load the page on a narrow viewport with a slower connection. The main product image should start loading promptly. Secondary gallery thumbnails can load later. Inspect the network request to confirm the browser chose the expected image width.
