← Back to Blog

Best Image Size for Websites

By IQCompress · Updated April 2026 · 13 min read

There is no universal pixel width that fits every website, because layout max-width, typography measure, and device mix all change how many image pixels actually contribute to perceived sharpness. What is universal is the principle: match decoded pixels to rendered CSS pixels—plus a modest retina multiplier— and avoid shipping five thousand horizontal pixels into an eight hundred pixel column. The “best” size is therefore a function of your grid, not a memeable number from a checklist.

Start from your content well. If the main column caps near 720–800 CSS pixels on large screens, a 1600px master file covers 2x density with headroom for slight crops. Full-bleed heroes spanning 1280–1440 CSS pixels often use 2400–2880px sources for retina. Anything beyond that rarely improves clarity on consumer displays but still costs decode time and bandwidth—both penalized by Core Web Vitals when the asset is LCP.

Thumbnails and cards are different animals. Category grids frequently render tiles between 280 and 400 CSS pixels; pairing a 400px-wide derivative with modern formats keeps rows fast when dozens load above the fold. Avatars may need only 96–128 CSS pixels—export square masters at 192–256px unless the UI crops circles with tight masks that reveal softness.

`srcset` and `sizes` exist so one upload does not decide every viewport. Provide at least three widths per creative: small for phones, medium for tablets, large for desktops. The browser picks; your job is accurate `sizes` metadata reflecting how wide the image renders at each breakpoint. Wrong `sizes` values cause browsers to download an image too large for the slot—one of the stealthiest performance bugs in responsive sites.

Art direction sometimes demands the HTML picture element: crop tighter on mobile than desktop, or swap aspect ratios between portrait and landscape heroes. When marketing insists on separate comps per breakpoint, store distinct files rather than scaling one giant PSD export—otherwise you ship unused pixels or awkward focal shifts.

CMS upload limits push authors toward arbitrary megapixel ceilings. Document recommended long-edge maximums per block type: hero, inline, thumbnail, OG image. OG images commonly land at 1200×630; Twitter and LinkedIn crop differently—maintain safe margins for headlines baked into art. Social cards are not the same as page heroes; duplicate assets rather than stretching one file across contexts.

Ecommerce deserves stricter tables: PDP galleries need zoom-friendly sources, while listing pages should never download zoom-tier megabytes. Lazy-load below-the-fold rows, but never lazy-load the LCP candidate— usually the first gallery image or hero—without replacing it with a lightweight placeholder that preserves layout stability.

Background images declared in CSS complicate responsive srcset delivery; prefer a semantic image element with object-fit when you need predictable LCP attribution. If CSS backgrounds remain, provide multiple image-set resolutions or media queries so mobile does not inherit a 4K desktop file.

Performance budgets help teams negotiate with design. Translate kilobyte targets into approximate quality floors: e.g., hero under 250KB on fast 4G, thumbnail under 35KB. When creative exceeds budget, negotiate width before quality—users notice load time before they notice imperceptible noise differences at 2x.

International audiences on metered plans amplify mistakes. Pair smaller derivatives with longer cache TTLs on CDN edges so repeat visits avoid re-downloads. Compression alone cannot fix an oversized dimensions strategy; IQCompress shines when you already right-sized and need trustworthy local passes before upload.

Finally, regression-test when redesigning. New CSS grid gaps or container queries can change effective image width without anyone touching media files. Add image size checks to visual QA: compare decoded dimensions against computed layout in DevTools. The best image size is the one that tracks your layout as it evolves—not a static number frozen from last year’s theme.

Document defaults in your design system README: breakpoints, `sizes` strings per component, allowed formats, and escalation paths when campaigns need exceptions. Authors ship faster when defaults are copy-pasteable, and performance stays predictable when exceptions are rare and reviewed.

Measurement closes the loop. After publishing new sizes, compare field LCP and total image bytes in RUM tools. If LCP improves but bounce rate flatlines, look beyond images—copy, layout shift, or interaction delays may dominate. Images are a lever, not the entire machine.