offscreen-lazy
O que ela faz
Esta skill verifica as tags de imagem de uma página e adiciona carregamento preguiçoso às imagens que estão fora da tela, mantendo a imagem principal visível no topo carregando de imediato. É para criadores de sites que querem carregamentos iniciais mais rápidos.
Quando usar
- ✓Quando você pede ao agente para acelerar uma página que carrega muitas imagens de uma vez.
- ✓Quando uma página longa baixa muitas fotos que os visitantes talvez nunca rolem para ver.
- ✓Quando você revisa a marcação de imagens e quer confirmar que a imagem principal não está em carregamento preguiçoso por engano.
Link da skill
https://github.com/thedaviddias/Front-End-Checklist/blob/main/skills/offscreen-lazy/SKILL.mdCopie 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
Para Claude Code, Codex ou Cursor: rode na pasta do projeto e a skill fica instalada.
Baixe o SKILL.md e coloque na pasta de skills do seu agente.
Exemplo do que pedir para a IA
“Minha longa página de produto carrega imagens demais de uma vez. Você pode adicionar carregamento preguiçoso às que estão abaixo da dobra?”
5 skills novas por semana. 1 minuto de leitura.
Como funciona
O agente revisa cada tag de imagem e acrescenta o atributo nativo de carregamento preguiçoso às que estão abaixo da primeira tela. Ele mantém a imagem principal com carregamento imediato e sugere os atributos width e height para evitar deslocamentos de layout.
Conteúdo técnico (SKILL.md original)
Texto original do autor, em inglês, direto do GitHub.
Lazy load offscreen images
Lazy loading eliminates unnecessary image downloads on initial page load. A page with 20 images below the fold may transfer several megabytes of data that users who don't scroll will never see. Deferring these downloads reduces Time to Interactive, improves LCP for above-fold content, and saves bandwidth—particularly impactful for users on metered mobile connections.
Quick Reference
- Add
loading="lazy"to all<img>elements below the fold - Never lazy-load the LCP image (hero, first product image)—use
fetchpriority="high"instead - Always pair
loading="lazy"withwidthandheightattributes to prevent CLS - Native
loading="lazy"has universal support in all modern browsers—no JavaScript polyfill needed - If fold position is unclear from the snippet, do not invent a lazy-loading defect
Check
Scan all <img> elements in this codebase. Identify: 1) Any <img> elements below the fold (not in the first viewport) that are missing loading="lazy". 2) Any <img> elements marked loading="lazy" that appear to be above the fold (hero images, first product images, logos in headers). 3) Any <img> with loading="eager" below the fold. Report the above-fold images that should NOT have lazy loading separately from below-fold images that should have it. If fold position cannot be inferred from the snippet, do not report missing lazy loading as a defect.
Fix
For images that should use lazy loading: 1) Add loading="lazy" to all <img> elements that appear below the fold. 2) Remove loading="lazy" from any hero, logo, or first-visible image—these should load immediately. 3) Ensure all lazy-loaded images have explicit width and height attributes to prevent CLS. 4) For the LCP image specifically, add fetchpriority="high" and remove loading="lazy". Show the corrected HTML for each modified image.
Explain
Explain how native browser lazy loading works. The loading="lazy" attribute tells the browser to defer image download until the image is within a browser-defined distance from the viewport (typically 1250px on a slow connection). This reduces the data transferred on initial load, lowers Time to Interactive, and saves bandwidth for users who never scroll to those images. Browser support is universal in modern browsers. The critical caveat: never lazy-load the LCP image—it must load as fast as possible.
Code Review
Review image assets, markup, and delivery configuration related to Lazy load offscreen images. 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/offscreen-lazy
Perguntas frequentes
Por que a imagem principal não deve ter carregamento preguiçoso?
Ela costuma ser o maior elemento visível, então carregá-la tarde pode atrasar o conteúdo principal. A skill sugere usar fetchpriority high nela.
Preciso de uma biblioteca JavaScript para isso?
Não. A skill diz que o carregamento preguiçoso nativo é suportado em todos os navegadores modernos e não precisa de polyfill.
E se não estiver claro se uma imagem está fora da tela?
A skill diz para não relatar um carregamento preguiçoso ausente, a menos que a imagem esteja razoavelmente claramente fora da tela ou não seja crítica.
Detalhes
Descrição original do autor
Use when reviewing image assets, markup, and CDN or build transforms related to Lazy load offscreen images. Check encoded size, rendered size, loading strategy, and above-the-fold impact together. Missing `loading='lazy'` is only a valid finding when you can reasonably tell the image is offscreen or non-critical.
Popularidade
- Estrelas no GitHub
- 75 mil
- Posição no ranking
- #2958
- Licença
- MIT
- Atualizada em
- 31/10/2026
Comentários
- …
Mais skills deste repositório
frontendchecklist
75 milVerifica código front-end e páginas no ar contra mais de 380 regras de acessibilidade, velocidade, SEO e segurança, usando uma ferramenta de linha de comando.
frontend-checklist-global
75 milAudita um projeto front-end contra todas as 386 regras do Front-End Checklist e dá uma correção específica para cada problema encontrado.
404-page
75 milVerifica se a sua página de conteúdo não encontrado oferece links úteis e retorna um status 404 real, para ajudar visitantes perdidos a encontrar o caminho.
about-page
75 milRevisa se o seu site tem uma página Sobre clara que explica quem está por trás dele, para criar confiança em visitantes e buscadores.
Skills parecidas
angular-developer
280 milAjuda seu agente a criar código Angular e a dar conselhos sobre a estrutura do projeto. É útil para iniciar novos projetos, criar partes do código ou melhorar a performance e acessibilidade.
frontend-a11y
280 milAjuda seu agente a tornar interfaces web acessíveis para todos. Ele garante que sites e apps funcionem bem com leitores de tela e navegação por teclado.
frontend-patterns
280 milFaz seu agente aplicar padrões modernos no desenvolvimento frontend. Ele otimiza performance, gerencia estado e segue boas práticas em React e Next.js.