the width/height attributes give the browser the image’s natural aspect ratio up-front, preventing layout shift. contain-intrinsic-size is only used as a fallback size before the real dimensions load, so using both keeps the layout stable in all cases.