Skip to content
Skills Library
Programming · Review & audit

image-optimization

/image-optimization

Use when reviewing image assets, markup, and CDN or build transforms related to Optimize all images for web. Check encoded size, rendered size, loading strategy, and above-the-fold impact together.

Licence
MIT
Last repository change
06.10.2026

Assessment and security

100/ 100Class: good
Format25 / 25
Frontmatter with name and description, valid name, description up to 1,024 characters, name matching the folder.
Discoverability25 / 25
Description explains when to use the skill, has a reasonable length and uses third person.
Content35 / 35
At least 150 words and at most 500 lines, headings, step lists, examples or code.
Hygiene15 / 15
No placeholders such as TODO, no Windows paths, with a licence.
Riskno signals detected in the scan
Files in this package
2
Scripts
0
HTML comments
0
URLs in SKILL.md
2
Deprecation

No signals detected. Repository changed on 06.10.2026, without references to retired models or APIs.

Licence

MIT, open: use and modify while retaining author attribution.

What it does and when to use it

Use when reviewing image assets, markup, and CDN or build transforms related to Optimize all images for web. Check encoded size, rendered size, loading strategy, and above-the-fold impact together.

Original author description

Use when reviewing image assets, markup, and CDN or build transforms related to Optimize all images for web. Check encoded size, rendered size, loading strategy, and above-the-fold impact together.

How it works

  1. Quick Reference
  2. Check
  3. Fix
  4. Explain
  5. Code Review
Original SKILL.md headings · 35 lines, 355 words
SKILL.md preview
---
name: image-optimization
description: "Use when reviewing image assets, markup, and CDN or build transforms related to Optimize all images for web. 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/image-optimization
---

# Optimize all images for web

Images typically account for 50%+ of page weight. Unoptimized images cause slow load times, wasted bandwidth, poor Core Web Vitals scores, and frustrated users—especially on mobile networks.

## Quick Reference

- Use modern formats: AVIF > WebP > JPEG/PNG
- Compress images to 80% quality for photos
- Always provide responsive srcset for different screen sizes
- Use `<picture>` element for format fallbacks

## Check

Scan this codebase for all image assets and <img> elements. For each image, verify: 1) Format is appropriate (WebP/AVIF for photos, SVG for icons, PNG only for transparency). 2) Responsive srcset and sizes attributes exist for images > 100px wide. 3) width/height attributes are present to prevent layout shift. 4) loading='lazy' is set for below-fold images. 5) File sizes are reasonable (< 200KB for photos, < 50KB for graphics). Report issues grouped by severity with file paths.

## Fix

For each image optimization issue found: 1) Convert JPEG/PNG photos to WebP with AVIF fallback using <picture> element. 2) Add srcset with 400w, 800w, 1200w, 1600w variants and appropriate sizes attribute. 3) Add explicit width/height attributes matching aspect ratio. 4) Add loading='lazy' to images below the fold, keep priority images without lazy loading. 5) Compress images to 80% quality for photos, 60% for AVIF. 6) Use SVG for icons and logos. Show the corrected HTML with optimized image markup.

## Explain

Explain the impact of image optimization on Core Web Vitals, specifically how unoptimized images affect Largest Contentful Paint (LCP) and Cumulative Layout Shift (CLS). Cover the compression differences between AVIF, WebP, and JPEG formats, when to use each, and browser support considerations. Describe how srcset and sizes work together to serve appropriately-sized images, and why width/height attributes prevent layout shift. Include bandwidth savings calculations and loading performance improvements.

## Code Review

Review image assets, markup, and delivery configuration related to Optimize all images for web. 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/image-optimization
Files in this package (2)
  • SKILL.md 3 KB
  • references/rule.md 8 KB

Versions

RepositoryScoreLicence
This page · thedaviddias/front-end-checklist100MIT
kostja94/marketing-skills100MIT
vladolaru/claude-code-plugins100MIT
vladolaru/claude-code-plugins100MIT
carlosuhart/seo-audit-skills100MIT
secondsky/claude-skills100MIT
unempyd/revenueos100MIT
arjunprabhulal/devops-skills100MIT
Amey-Thakur/AI-SKILLS90MIT

Database snapshot: 13.11.2026 · package version 10d8863d83f8 (SHA-256 digest of the entire package)

Downloads in the last 30 days: 0 · ranking

Report a problem with this skill: harmful content, incorrect descriptions or an author’s removal request.

Similar skills

  • 100image-cdn
    Use when reviewing image assets, markup, and CDN or build transforms related to Serve images from a CDN. Check encoded size, rendered size, loading strategy, and above-the-fold impact together.
  • 100image-compression
    Use when reviewing image assets, markup, and CDN or build transforms related to Compress images without quality loss. Check encoded size, rendered size, loading strategy, and above-the-fold impact together.
  • 90frontend-image-optimization
    Use this skill when the user says 'image optimization', 'responsive images', 'image CDN', 'lazy loading images', 'next/image', 'srcset', 'picture element', 'WebP', 'AVIF', 'image compression', 'image CDN', 'blur placeholder', 'progressive image'. Optimize images for web…
  • 100netlify-image-cdn
    使用 Netlify Image CDN 进行图片优化和转换的指南。在提供优化图片、创建响应式图片标记、设置用户上传图片流水线,或配置图片转换时使用。涵盖 `/.netlify/images` 端点、查询参数、远程图片白名单、简洁 URL 重写,以及结合 Functions + Blobs 的上传组合方案。
  • 100imgix
    Optimize and transform images with imgix, a real-time image CDN driven by URL parameters. Use when serving responsive images, implementing an image CDN, signing image URLs, adding real-time transformations, extracting video thumbnails, or optimizing Core Web Vitals with image delivery.
  • 100web-performance
    Use this skill whenever the user is improving Core Web Vitals or page load performance, or mentions slow pages, PageSpeed Insights / Lighthouse failures or insights, LCP/CLS/INP scores, bundle size, image/font optimization, or third-party script impact. Covers Core Web Vitals,…

Feedback and reports

Your message goes to Bartosz Sokoliński. An email address is needed only for a reply. See the privacy policy.