Przejdź do treści
Biblioteka skilli
Projektowanie i UX · Przegląd i audyt

responsive-size

/responsive-size

Przegląda zasoby graficzne, znaczniki i transformacje CDN pod kątem właściwego rozmiaru obrazów, ładowania i wpływu na pierwszy ekran.

Licencja
MIT
Ostatnia zmiana repozytorium
06.10.2026

Ocena i bezpieczeństwo

100/ 100Klasa: dobry
Format25 / 25
Frontmatter z nazwą i opisem, poprawna nazwa, opis do 1024 znaków, nazwa zgodna z folderem.
Odkrywalność25 / 25
Opis mówi, kiedy użyć skilla, ma sensowną długość i jest w 3. osobie.
Treść35 / 35
Co najmniej 150 słów i do 500 linii, nagłówki, listy kroków, przykłady albo kod.
Higiena15 / 15
Bez zaślepek typu TODO, bez ścieżek Windows, z licencją.
Ryzykobrak sygnałów w skanie
Pliki w paczce
2
Skrypty
0
Komentarze HTML
0
Adresy URL w SKILL.md
2
Przestarzałość

Brak sygnałów. Repozytorium zmienione 06.10.2026, bez odwołań do wycofanych modeli i API.

Licencja

MIT, otwarta: można używać i zmieniać, z zachowaniem informacji o autorze.

Co robi i kiedy

Przegląda zasoby graficzne, znaczniki i transformacje CDN pod kątem właściwego rozmiaru obrazów, ładowania i wpływu na pierwszy ekran.

Oryginalny opis (EN)

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.

Jak działa

  1. Quick Reference
  2. Check
  3. Fix
  4. Explain
  5. Code Review
Sekcje z nagłówków SKILL.md, w oryginale · 35 linii, 417 słów
Podgląd SKILL.md
---
name: responsive-size
description: "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."
metadata:
  category: images
  priority: high
  difficulty: intermediate
  estimatedTime: "20"
  source: frontendchecklist.io
  url: https://frontendchecklist.io/rules/images/responsive-size
---

# 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
Pliki w paczce (2)
  • SKILL.md 3 KB
  • references/rule.md 5 KB

Wersje

W bazie nie ma innych skilli o nazwie responsive-size.

Migawka bazy z 13.11.2026 · wersja paczki 39db4f63d328 (skrót SHA-256 całej paczki)

Pobrania w ostatnich 30 dniach: 0 · ranking

Zgłoś problem z tym skillem: szkodliwa treść, błędny opis albo prośba autora o usunięcie.

Podobne skille

  • 100image-cdn
    Sprawdza zasoby graficzne, znaczniki i transformacje CDN lub buildu pod kątem serwowania obrazów z CDN: rozmiar pliku, rozmiar renderowany, ładowanie i wpływ na pierwszy ekran.
  • 100image-optimization
    Sprawdza zasoby graficzne, znaczniki i transformacje CDN lub buildu pod kątem optymalizacji wszystkich obrazów dla sieci: rozmiar pliku, rozmiar renderowany, ładowanie i wpływ na pierwszy ekran.
  • 100cloudinary
    Zarządza obrazami i wideo w Cloudinary: optymalizacja, transformacje, obrazy responsywne, wysyłanie multimediów i serwowanie zasobów z CDN.
  • 100netlify-image-cdn
    Opisuje optymalizację i transformację obrazów przez Netlify Image CDN: endpoint /.netlify/images, parametry zapytania, białą listę zdalnych obrazów, responsywne znaczniki i potok obrazów użytkowników.
  • 95netlify-image-cdn
    Optymalizuje i przekształca obrazy przez Netlify Image CDN, tworząc responsywne znaczniki i potoki przesyłania zdjęć.
  • 90frontend-image-optimization
    Optymalizuje obrazy na stronie: formaty WebP i AVIF, responsywne srcset, leniwe ładowanie, zastępcze podglądy i integrację z CDN.

Uwagi i zgłoszenia

Wiadomość trafi do Bartosza Sokolińskiego. Adres e-mail jest potrzebny tylko do odpowiedzi. Szczegóły w polityce prywatności.