Images scale to container width on mobile
Why it matters
An <img> tag with width="1200" and no max-width: 100% renders at 1200 physical pixels even on a 375px-wide phone, forcing horizontal scroll and cutting off surrounding content. This breaks layout for every page containing the image and undermines the viewport meta configuration that would otherwise keep the page mobile-friendly. Images are one of the most common causes of accidental overflow because <img> defaults do not include any responsive constraint.
Severity rationale
High because image overflow is visible on every page the image appears on and degrades every mobile visitor's experience.
Remediation
Apply a global CSS rule to all images so they scale down to their container. For Next.js <Image>, always provide a sizes prop so the browser picks the right source at each breakpoint. Put the base rule in src/app/globals.css.
img { max-width: 100%; height: auto; display: block; }
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 Mobile Responsiveness Audit. The pattern definition, severity rationale, and remediation remain openly licensed under CC-BY-4.0.
Taxons
History
- 2026-04-18·v1.0.0·Initial import from mobile-responsiveness·automated