KKitForma.

Language

EnglishEnglishTürkçeTurkishGuide unavailable in this language · open toolsDeutschGermanGuide unavailable in this language · open toolsEspañolSpanishGuide unavailable in this language · open toolsFrançaisFrenchGuide unavailable in this language · open toolsPortuguêsPortugueseGuide unavailable in this language · open toolsItalianoItalianGuide unavailable in this language · open toolsNederlandsDutchGuide unavailable in this language · open toolsPolskiPolishGuide unavailable in this language · open toolsРусскийRussianGuide unavailable in this language · open toolsУкраїнськаUkrainianGuide unavailable in this language · open toolsSvenskaSwedishGuide unavailable in this language · open toolsNorskNorwegianGuide unavailable in this language · open toolsDanskDanishGuide unavailable in this language · open toolsSuomiFinnishGuide unavailable in this language · open toolsČeštinaCzechGuide unavailable in this language · open toolsRomânăRomanianGuide unavailable in this language · open toolsΕλληνικάGreekGuide unavailable in this language · open toolsالعربيةArabicGuide unavailable in this language · open toolsעבריתHebrewGuide unavailable in this language · open toolsفارسیPersianGuide unavailable in this language · open toolsاردوUrduGuide unavailable in this language · open toolsहिन्दीHindiGuide unavailable in this language · open toolsবাংলাBengaliGuide unavailable in this language · open toolsதமிழ்TamilGuide unavailable in this language · open toolsతెలుగుTeluguGuide unavailable in this language · open toolsमराठीMarathiGuide unavailable in this language · open toolsગુજરાતીGujaratiGuide unavailable in this language · open tools简体中文Chinese SimplifiedGuide unavailable in this language · open tools繁體中文Chinese TraditionalGuide unavailable in this language · open tools日本語JapaneseGuide unavailable in this language · open tools한국어KoreanGuide unavailable in this language · open toolsTiếng ViệtVietnameseGuide unavailable in this language · open toolsไทยThaiGuide unavailable in this language · open toolsBahasa IndonesiaIndonesianGuide unavailable in this language · open toolsBahasa MelayuMalayGuide unavailable in this language · open toolsFilipinoFilipinoGuide unavailable in this language · open toolsKiswahiliSwahiliGuide unavailable in this language · open toolsAfrikaansAfrikaansGuide unavailable in this language · open toolsMagyarHungarianGuide unavailable in this language · open toolsБългарскиBulgarianGuide unavailable in this language · open toolsHrvatskiCroatianGuide unavailable in this language · open toolsSrpskiSerbianGuide unavailable in this language · open toolsSlovenčinaSlovakGuide unavailable in this language · open toolsSlovenščinaSlovenianGuide unavailable in this language · open toolsLietuviųLithuanianGuide unavailable in this language · open toolsLatviešuLatvianGuide unavailable in this language · open toolsEestiEstonianGuide unavailable in this language · open toolsCatalàCatalanGuide unavailable in this language · open toolsEuskaraBasqueGuide unavailable in this language · open tools
← Questions & answers

KITFORMA · EDITORIAL ANSWER

Why does content jump when responsive images finish loading?

KitForma editorial guide. Reserve a responsive image’s aspect ratio with correct width and height attributes before its pixels load.

HTML, CSS & accessibility →

Step-by-step answer

The browser can reserve the image’s aspect ratio before decoding it when width and height describe the source correctly. Save this self-contained example as an HTML file and open it in a browser. Runnable example:
html
<!doctype html>
<meta charset="utf-8">
<title>Reserved image space</title>
<div style="width:300px; max-width:100%">
  <img width="1200" height="800" alt="Blue demonstration rectangle"
    style="display:block; max-width:100%; height:auto"
    src="data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='1200' height='800'%3E%3Crect width='1200' height='800' fill='steelblue'/%3E%3C/svg%3E">
  <p>This text follows the reserved image box.</p>
</div>
Expected result: At a 300 CSS-pixel container width, the image box is 300 × 200 CSS pixels. Narrowing the container preserves the 3:2 ratio. Why it works: 1200 divided by 800 is 1.5, so a 300-pixel width needs 200 pixels of height. CSS scales the display box; it does not rewrite the image file. Removing dimensions and delaying a real image request is a useful comparison, because this inline image loads immediately. Scope and checks: HTML and CSS in modern browsers. Replace the SVG fixture with your own image and its actual dimensions, then test with cache disabled and network throttling. Different aspect ratios in picture sources need breakpoint-specific sizing. Dimensions reduce image-caused shifts; they do not prevent shifts from fonts or other content. Related tools and guides: Create a correctly sized image copy: https://kitforma.com/en/resize/ Cover versus contain example: https://kitforma.com/en/community/questions/7aa10000-0000-4000-8000-000000003620/ Primary sources (reviewed 2026-10-08): WHATWG HTML — image dimensions and aspect ratios: https://html.spec.whatwg.org/multipage/images.html#attributes-for-embedding-content

Sources and verification

Sources checked:

This editorial answer was prepared by KitForma with AI assistance. It is not presented as a real member question or an independent user review. Check the sources and the result with your own file; report corrections in the discussion.

Discussion and community answers

Loading community…
KitForma

What would you like to do?