responsive-size
What it does
This skill checks how large each image is compared with how big it appears on screen, and fixes images that are far too big. It is for web builders whose pages load slowly because of oversized pictures.
When to use it
- ✓When you ask the agent to find oversized images on your site.
- ✓When a page audit reports that images are larger than they need to be.
- ✓When a hero image is very large but shows in a small container on phones.
Skill link
https://github.com/thedaviddias/Front-End-Checklist/blob/main/skills/responsive-size/SKILL.mdCopy it and paste it into your AI (Claude, ChatGPT or Cursor), asking it to follow the instructions.
How to use
The easiest way: copy the message and paste it into your AI. It reads the skill and follows the instructions.
Ready-to-paste message
For Claude Code, Codex or Cursor: run it in your project folder and the skill gets installed.
Download the SKILL.md and drop it into your agent’s skills folder.
Example of what to ask your AI
“Some of the photos on my site are huge compared to how they show on screen. Can you find them and make smaller versions?”
5 new skills a week. 1 minute to read.
How it works
The agent compares each image's real width with its displayed width at common screen sizes. For oversized images, it creates variants at several widths and adds srcset and sizes so the browser picks the right one.
Technical content (original SKILL.md)
Original text by the author, straight from GitHub.
Serve images at the correct display size
A single oversized hero image can add several megabytes to a page load unnecessarily. On mobile devices with 375px screens, serving a 1600px image downloads 4x the data users need. The 'Properly size images' Lighthouse audit consistently identifies this as one of the highest-impact performance opportunities on most websites.
Quick Reference
- Serving a 1600px image in a 400px container wastes ~16x the necessary bandwidth
- Use
srcsetwith width descriptors andsizeswith actual layout widths - The
sizesattribute is critical—without it the browser assumes100vwand picks the largest image - Lighthouse 'Properly size images' audit reports estimated savings per oversized image
Check
Audit images in this codebase for oversizing. Use Lighthouse 'Properly size images' audit results as the primary signal. For each <img> in the HTML: 1) Compare the image file's intrinsic width to the element's rendered CSS width (check CSS rules, container constraints). 2) Flag any image where the intrinsic width is more than 2x the rendered width at any common viewport size. 3) Check for srcset usage—images over 200px wide should have srcset variants. 4) Check sizes attribute accuracy—does it reflect the actual CSS layout?
Fix
For each oversized image: 1) Generate multiple size variants: 400w, 800w, 1200w, 1600w (use Sharp or Squoosh). 2) Add srcset listing each variant with its width descriptor. 3) Add a sizes attribute describing the image's display width at each breakpoint (e.g., sizes="(max-width: 600px) 100vw, (max-width: 1200px) 50vw, 400px"). 4) For art direction (different crops), use <picture> with media attributes. 5) For the <img> src fallback, use the medium size (800w). Show complete before/after HTML.
Explain
Explain why serving oversized images wastes bandwidth. If a browser renders an image at 400px wide but the image file is 2000px wide, the browser downloads ~25x more pixel data than it can display (bandwidth scales with pixel count, not linear dimensions). The Lighthouse 'Properly size images' audit estimates potential savings in KiB for each oversized image. The sizes attribute is the key to accuracy—without it, the browser assumes 100vw and downloads the largest srcset candidate even on narrow viewports.
Code Review
Review image assets, markup, and delivery configuration related to Serve images at the correct display size. Flag exact files or components where format choice, sizing, or loading behavior violates the rule, and describe how to confirm the fix in DevTools.
For full implementation details, code examples, and framework-specific guidance,
see references/rule.md.
Rule page: https://frontendchecklist.io/rules/images/responsive-size
FAQ
What is a typical size set?
The skill suggests variants at 400, 800, 1200, and 1600 pixels wide.
Why does the sizes attribute matter?
The skill says without it, the browser assumes the image spans the full screen width and picks the largest file.
Which tools can resize the images?
The skill mentions Sharp or Squoosh for creating the variants.
Details
Original description by the author
Use when reviewing image assets, markup, and CDN or build transforms related to Serve images at the correct display size. Check encoded size, rendered size, loading strategy, and above-the-fold impact together.
Popularity
- GitHub stars
- 75k
- Ranking position
- #2998
- License
- MIT
- Updated
- 10/31/2026
Comments
- …
More skills from this repository
frontendchecklist
75kChecks frontend code and live pages against 380+ rules for accessibility, speed, SEO and security, using a command-line tool.
frontend-checklist-global
75kAudits a frontend project against all 386 Front-End Checklist rules, and gives a specific fix for each issue found.
404-page
75kChecks that your missing-page screen offers helpful links and returns a real 404 status, to help lost visitors find their way.
about-page
75kReviews whether your site has a clear About page that explains who runs it, to build trust with visitors and search engines.
Similar skills
gifgrep
394kLets your agent search GIF libraries, preview results, download a GIF, and pull out a still frame or a contact sheet of frames.
meme-maker
394kLets your agent pick a meme template, add your own captions, and create the meme as an SVG or PNG image.
ios-icon-gen
280kLets your agent generate icons for iOS apps. It uses Apple symbols or icons from other sources to create the correct files.