본문으로 건너뛰기
Skillpedia
이미지 및 아이콘75k · #2998

responsive-size

하는 일

이 스킬은 각 이미지의 실제 크기와 화면에 표시되는 크기를 비교하고, 지나치게 큰 이미지를 고칩니다. 지나치게 큰 사진 때문에 페이지가 느린 웹 제작자를 위한 것입니다.

사용하는 경우

  • ✓사이트에서 지나치게 큰 이미지를 찾아 달라고 요청할 때.
  • ✓페이지 감사에서 이미지가 필요 이상으로 크다고 보고될 때.
  • ✓히어로 이미지가 아주 크지만 휴대폰에서는 작은 영역에 보일 때.

스킬 링크

https://github.com/thedaviddias/Front-End-Checklist/blob/main/skills/responsive-size/SKILL.md

복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.

사용 방법

가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.

바로 붙여넣을 수 있는 메시지

Use this skill to help me: https://github.com/thedaviddias/Front-End-Checklist/blob/main/skills/responsive-size/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
AI가 이런 스킬을 알아서 찾아 쓰길 원하시나요?무료 Skillpedia MCP를 설치하세요. 한 줄이면 작업마다 스킬 15,000+개 중에서 검색합니다.1분 만에 설치 →

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 srcset with width descriptors and sizes with actual layout widths
  • The sizes attribute is critical—without it the browser assumes 100vw and 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.

repo: thedaviddias/Front-End-Checklist

인기도

GitHub 스타
75k
순위
#2998
라이선스
MIT
업데이트
2026. 10. 31.

이 스킬이 유용한가요?

0

로그인 투표하려면 로그인하세요.

댓글

  • …

이 저장소의 다른 스킬

비슷한 스킬