responsive-size
하는 일
이 스킬은 각 이미지의 실제 크기와 화면에 표시되는 크기를 비교하고, 지나치게 큰 이미지를 고칩니다. 지나치게 큰 사진 때문에 페이지가 느린 웹 제작자를 위한 것입니다.
사용하는 경우
- ✓사이트에서 지나치게 큰 이미지를 찾아 달라고 요청할 때.
- ✓페이지 감사에서 이미지가 필요 이상으로 크다고 보고될 때.
- ✓히어로 이미지가 아주 크지만 휴대폰에서는 작은 영역에 보일 때.
스킬 링크
https://github.com/thedaviddias/Front-End-Checklist/blob/main/skills/responsive-size/SKILL.md복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.
사용 방법
가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.
바로 붙여넣을 수 있는 메시지
Claude Code, Codex, Cursor용입니다. 프로젝트 폴더에서 실행하면 스킬이 설치됩니다.
SKILL.md를 다운로드해 에이전트의 스킬 폴더에 넣으세요.
AI에게 요청하는 예시
“제 사이트의 사진 중 화면에 보이는 크기에 비해 너무 큰 것이 있습니다. 찾아서 더 작은 버전을 만들어 주실 수 있나요?”
매주 새 스킬 5개. 읽는 데 1분.
작동 방식
에이전트는 일반적인 화면 크기에서 각 이미지의 실제 너비와 표시 너비를 비교합니다. 너무 큰 이미지는 여러 너비의 버전을 만들고, 브라우저가 알맞은 것을 고르도록 srcset과 sizes를 추가합니다.
기술 내용 (원본 SKILL.md)
작성자의 영어 원문을 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
자주 묻는 질문
일반적인 크기 세트는 무엇인가요?
스킬은 400, 800, 1200, 1600픽셀 너비의 버전을 제안합니다.
sizes 속성은 왜 중요한가요?
스킬은 이것이 없으면 브라우저가 이미지가 화면 전체 너비를 차지한다고 가정해 가장 큰 파일을 고른다고 설명합니다.
이미지 크기를 바꾸는 도구는 무엇인가요?
스킬은 버전을 만드는 데 Sharp나 Squoosh를 언급합니다.
상세 정보
작성자의 원본 설명
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.
인기도
- GitHub 스타
- 75k
- 순위
- #2998
- 라이선스
- MIT
- 업데이트
- 2026. 10. 31.
댓글
- …
이 저장소의 다른 스킬
frontendchecklist
75k명령줄 도구를 사용해 380개가 넘는 규칙으로 프런트엔드 코드와 실시간 페이지를 접근성, 속도, SEO, 보안 측면에서 점검합니다.
frontend-checklist-global
75kFront-End Checklist의 386개 규칙 전체로 프런트엔드 프로젝트를 감사하고, 발견한 문제마다 구체적인 해결 방법을 제시합니다.
404-page
75k없는 페이지 화면에 도움이 되는 링크가 있고 실제 404 상태 코드를 반환하는지 확인해, 길을 잃은 방문자를 돕습니다.
about-page
75k사이트를 운영하는 사람을 설명하는 명확한 소개 페이지가 있는지 검토해, 방문자와 검색 엔진의 신뢰를 높입니다.