Good image work is less about one perfect setting and more about understanding the destination. This guide gives you a repeatable path and points out the trade-offs worth checking.
Start from the layout, not a magic chart
The best size is tied to the rendered slot. Measure the widest display width the image reaches in your design. An article image in a 760-pixel column does not need the same source as a full-bleed 1600-pixel hero.
Responsive websites may use several source widths. If your publishing system does not generate those automatically, a carefully chosen maximum width is still better than uploading the untouched camera file.
Practical starting ranges
For article images, 1200–1600 pixels wide is a flexible starting range. Small cards often need 600–900 pixels. Full-width hero images commonly need 1600–2400 pixels depending on the layout and high-density strategy.
These are starting points, not requirements. A narrow site, unusually detailed image, or very large display can justify another choice.
- Article content: often 1200–1600 px wide
- Cards and thumbnails: often 600–900 px wide
- Wide hero art: often 1600–2400 px wide
Dimensions and file size solve different problems
Pixel dimensions control how much visual data is available and influence layout. Compression controls how efficiently that data is stored. A 200 KB image can still be dimensionally huge and costly for the browser to decode.
Resize first, then compress. Record both the pixel target and a visual-quality standard for consistent publishing.
Protect layout stability
Provide width and height attributes or an aspect-ratio container so the page reserves space before the image arrives. This reduces unexpected content movement.
Keep card-image ratios consistent across a list. A tidy crop system is often more valuable to perceived quality than chasing a few additional compression points.
Accessibility and content
File optimization does not replace meaningful alternative text. Describe informative images according to their purpose; mark purely decorative images appropriately.
Do not bake essential body text into an image. Real HTML text is easier to read, translate, resize, and index.
Questions people ask
Is 1920 pixels always enough?
No single width fits every layout, but 1920 px covers many wide web placements.
Should blog images be 72 DPI?
Browsers primarily use pixel dimensions; embedded DPI is usually not the delivery-size decision.
Why set width and height in HTML?
They help reserve layout space and reduce visual shifting while images load.