Imágenes optimizadas automáticamente
Sin configuración: nexa build optimiza todo <img src="/foto.jpg">
(o .jpeg/.png) estático de más de 480px de ancho.
<img src="/img/hero.jpg" alt="Portada" />se convierte en dist/ en:
<picture>
<source type="image/avif" srcset="/img/hero-480.avif 480w, .../hero-768.avif 768w, .../hero-1280.avif 1280w, .../hero-1920.avif 1920w" sizes="100vw">
<img src="/img/hero.jpg" alt="Portada"
srcset="/img/hero-480.jpg 480w, .../hero-768.jpg 768w, .../hero-1280.jpg 1280w, /img/hero.jpg 1920w"
sizes="100vw" width="1920" height="1080" loading="lazy">
</picture>- Solo AVIF (no WebP — el encoder disponible en Rust es lossless-only, inútil para fotos).
width/height/loading="lazy"se completan solos si faltaban.- Un
src={expr}dinámico no se toca (no hay forma de saber en build qué archivo es). Una imagen de 480px o menos tampoco (no vale la pena). - Tiene costo real de tiempo de build — varios segundos por foto grande.