Images served with explicit width and height to prevent layout shift
Why it matters
Images without explicit width and height attributes cause Cumulative Layout Shift (CLS) — the browser reserves no space until the image loads, then reflows all surrounding content. Google's Core Web Vitals threshold for CLS is 0.1; a directory listing page with 8 unsized images can easily exceed 0.5, dropping the page into the 'Poor' range and triggering a search ranking penalty. iso-25010:2011 performance-efficiency classifies layout stability as a resource utilization quality attribute. Beyond SEO, layout shift causes users to misclick adjacent links, a user-experience failure that increases bounce rate on listing pages where conversion depends on clicking through to the business.
Severity rationale
Medium because CLS from missing dimensions measurably degrades Core Web Vitals scores and search ranking, but the failure does not expose data or create security risk.
Remediation
Add explicit width and height to every listing image, or enforce a consistent aspect ratio via CSS aspect-ratio. For Next.js projects, use the <Image> component which enforces dimensions and handles responsive sizing.
// Using Next.js Image for automatic CLS prevention
import Image from 'next/image';
<Image
src={listing.imageUrl}
alt={`${listing.name} storefront`}
width={800}
height={600}
className="w-full h-auto"
/>
For plain <img> tags, at minimum add style={{ aspectRatio: '4/3' }} alongside width and height. Validate CLS improvement with Lighthouse or PageSpeed Insights after deploying the fix.
DetectionPro
The detection method for this pattern is part of AuditBuffet Pro.
The full method (what to look for, pass and fail conditions, and how results get reported) ships inside the Listing Data & Schema Audit. The pattern definition, severity rationale, and remediation remain openly licensed under CC-BY-4.0.
External references
- iso-25010:2011 · performance-efficiency.time-behaviour — Performance efficiency — time behaviour (CLS prevention)
Taxons
History
- 2026-04-18·v1.0.0·Initial import from directory-listing-schema·automated