Nexav0.1

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.

tsx
<img src="/img/hero.jpg" alt="Portada" />

se convierte en dist/ en:

html
<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>

Editar esta página en GitHub