offscreen-lazy
Qué hace
Esta skill revisa las etiquetas de imagen de una página y añade carga diferida a las imágenes que están fuera de la pantalla, manteniendo la imagen principal de la parte superior cargando de inmediato. Es para creadores web que quieren cargas iniciales más rápidas.
Cuándo usarla
- ✓Cuando pides al agente acelerar una página que carga muchas imágenes a la vez.
- ✓Cuando una página larga descarga muchas fotos que quizá los visitantes nunca vean.
- ✓Cuando revisas el marcado de imágenes y quieres confirmar que la imagen principal no tiene carga diferida por error.
Link de la skill
https://github.com/thedaviddias/Front-End-Checklist/blob/main/skills/offscreen-lazy/SKILL.mdCópialo y pégalo en tu IA (Claude, ChatGPT o Cursor) pidiéndole que siga las instrucciones.
Cómo usar
La forma más fácil: copia el mensaje y pégalo en tu IA. Ella lee la skill y sigue las instrucciones.
Mensaje listo para pegar
Para Claude Code, Codex o Cursor: ejecútalo en la carpeta del proyecto y la skill queda instalada.
Descarga el SKILL.md y ponlo en la carpeta de skills de tu agente.
Ejemplo de qué pedirle a la IA
“Mi página larga de productos carga demasiadas imágenes a la vez. ¿Puedes añadir carga diferida a las que están debajo del pliegue?”
5 skills nuevas por semana. 1 minuto de lectura.
Cómo funciona
El agente revisa cada etiqueta de imagen y añade el atributo nativo de carga diferida a las que están debajo de la primera pantalla. Mantiene la imagen principal con carga inmediata y sugiere atributos width y height para evitar desplazamientos del diseño.
Contenido técnico (SKILL.md original)
Texto original del autor, en inglés, directo de 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
Preguntas frecuentes
¿Por qué la imagen principal no debe tener carga diferida?
Suele ser el elemento visible más grande, así que cargarla tarde puede ralentizar el contenido principal. La skill sugiere fetchpriority con valor high para ella.
¿Necesito una biblioteca de JavaScript para esto?
No. La skill indica que la carga diferida nativa es compatible con todos los navegadores modernos y no necesita polyfill.
¿Qué pasa si no está claro si una imagen está fuera de la pantalla?
La skill indica que no debe reportar una carga diferida faltante a menos que la imagen esté razonablemente fuera de pantalla o no sea crítica.
Detalles
Descripción original del 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.
Popularidad
- Estrellas en GitHub
- 75 mil
- Posición en el ranking
- #2958
- Licencia
- MIT
- Actualizada
- 31/10/2026
Comentarios
- …
Más skills de este repositorio
frontendchecklist
75 milRevisa código frontend y páginas en vivo con más de 380 reglas de accesibilidad, velocidad, SEO y seguridad, usando una herramienta de línea de comandos.
frontend-checklist-global
75 milAudita un proyecto frontend con las 386 reglas de Front-End Checklist y ofrece una corrección concreta para cada problema encontrado.
404-page
75 milComprueba que tu página de no encontrado ofrezca enlaces útiles y devuelva un estado 404 real, para ayudar a los visitantes perdidos a encontrar su camino.
about-page
75 milRevisa si tu sitio tiene una página Sobre nosotros clara que explique quién lo dirige, para generar confianza en los visitantes y en los buscadores.
Skills parecidas
angular-developer
280 milAyuda a tu agente con código de Angular y la estructura del proyecto. Útil para empezar proyectos, crear partes de código o mejorar el rendimiento y la accesibilidad.
frontend-a11y
280 milAyuda a tu agente a hacer que las interfaces web sean accesibles para todos. Asegura que sitios y apps funcionen bien con lectores de pantalla y navegación por teclado.
frontend-patterns
280 milHace que tu agente aplique patrones modernos en desarrollo frontend. Optimiza el rendimiento, gestiona el estado y sigue buenas prácticas en React y Next.js.