Pular para o conteúdo
Skillpedia
Imagens e ícones75 mil · #2944

modern-format

O que ela faz

Esta skill encontra imagens em formatos antigos e sugere formatos modernos, como WebP ou AVIF, que geram arquivos menores. Ela é para criadores web que querem páginas mais rápidas e menos consumo de dados.

Quando usar

  • ✓Quando você pede ao agente para deixar as imagens de um site mais rápidas de carregar.
  • ✓Quando uma página parece lenta porque suas fotos e gráficos são arquivos grandes.
  • ✓Quando você prepara imagens para um site e quer formatos modernos com alternativas seguras.

Link da skill

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

Copie e cole na sua IA (Claude, ChatGPT ou Cursor) pedindo para seguir as instruções.

Como usar

O jeito mais fácil: copie a mensagem e cole na sua IA. Ela lê a skill e segue as instruções.

Mensagem pronta para colar

Use esta skill para me ajudar: https://github.com/thedaviddias/Front-End-Checklist/blob/main/skills/modern-format/SKILL.md Leia o arquivo SKILL.md desse link e siga as instruções dele na minha tarefa.
Quer que a sua IA encontre skills como esta sozinha?Instale o MCP grátis do Skillpedia: uma linha, e ela pesquisa entre 15.000+ skills antes de cada tarefa.Instalar em 1 minuto →

Exemplo do que pedir para a IA

“As imagens do meu site demoram para carregar. Você pode convertê-las para um formato moderno e atualizar o código?”

5 skills novas por semana. 1 minuto de leitura.

Como funciona

O agente analisa as tags de imagem e as imagens de fundo em busca de arquivos JPEG e PNG. Ele ajuda a criar versões em WebP ou AVIF opcional e envolve as imagens em elementos picture com alternativas para navegadores mais antigos.

Conteúdo técnico (SKILL.md original)

Texto original do autor, em inglês, direto do GitHub.

Use modern image formats (WebP, AVIF)

Images are typically 50%+ of page weight. Switching from JPEG to WebP alone reduces transfer sizes by 25-35% with no visible quality change, directly improving Largest Contentful Paint (LCP) and saving bandwidth for users on mobile data plans. These savings compound across every visitor and every image on the site.

Quick Reference

  • WebP is ~25-35% smaller than JPEG at equivalent quality (per web.dev)
  • AVIF is ~40-50% smaller than JPEG at equivalent quality (per web.dev)
  • Use <picture> with <source type="image/avif"> and <source type="image/webp"> plus an <img> fallback
  • WebP has 97%+ global browser support; AVIF is supported in all modern browsers as of 2023

Check

Scan all <img> elements and CSS background-image declarations in this codebase. Identify: 1) Any <img src> pointing to .jpg, .jpeg, or .png files (not served via a CDN that auto-negotiates format). 2) Any <picture> elements that lack <source type="image/webp"> or <source type="image/avif"> entries. 3) Any CSS background images using JPEG or PNG when a WebP equivalent could be used. Report each finding with file path and line number.

Fix

For each image not using modern formats: 1) Convert to WebP at 80% quality using Squoosh or Sharp. 2) Optionally also generate AVIF at 60% quality for browsers that support it. 3) Wrap the original <img> in a <picture> element and add <source type="image/avif"> and <source type="image/webp"> entries with the new files. 4) Keep the original JPEG/PNG as the <img src> fallback. For CSS background images, use a @supports (background-image: url('.webp')) { } query to serve WebP to supporting browsers.

Explain

Explain the compression advantages of WebP and AVIF over JPEG and PNG. According to web.dev, WebP lossless images are 26% smaller than PNG and WebP lossy images are 25-35% smaller than JPEG at equivalent visual quality. AVIF offers further improvements: roughly 40-50% smaller than equivalent JPEG. Explain browser support: WebP has 97%+ global browser support as of 2024. AVIF is supported in Chrome 85+, Firefox 93+, and Safari 16.4+. The <picture> element with fallbacks means there is no risk in adopting these formats today.

Code Review

Review image assets, markup, and delivery configuration related to Use modern image formats (WebP, AVIF). 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/modern-format

Perguntas frequentes

As imagens WebP são bem menores?

A skill diz que o WebP é cerca de 25 a 35 por cento menor que o JPEG com qualidade semelhante, e o AVIF pode ser ainda menor.

Navegadores mais antigos ainda mostram as imagens?

Sim. O elemento picture usa uma alternativa com img, então navegadores sem suporte ao novo formato ainda mostram a imagem.

Isso afeta a velocidade de carregamento?

A skill diz que imagens menores podem melhorar o Largest Contentful Paint e reduzir o consumo de dados.

Detalhes

Descrição original do autor

Use when reviewing image assets, markup, and CDN or build transforms related to Use modern image formats (WebP, AVIF). Check encoded size, rendered size, loading strategy, and above-the-fold impact together.

repo: thedaviddias/Front-End-Checklist

Popularidade

Estrelas no GitHub
75 mil
Posição no ranking
#2944
Licença
MIT
Atualizada em
31/10/2026

Essa skill é útil?

0

Entre para votar.

Comentários

  • …

Mais skills deste repositório

Skills parecidas