Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save JorgeDevmm/a201f50736b848bac2b4f7a98a4a420d to your computer and use it in GitHub Desktop.
Save JorgeDevmm/a201f50736b848bac2b4f7a98a4a420d to your computer and use it in GitHub Desktop.
Gist para Imágenes HTML5 con AVIF, webp y JPG
"imagenes": {
"prefix": "pic",
"body": [
"<picture>",
"<source",
"\t sizes=\"1920w, 1280w, 640w\" ",
"\t srcset=\"img/imagen.avif 1920w, \n\t\t\t img/imagen-1280.avif 1280w, \n\t\t\t img/imagen-640.avif 640w\" ",
"\t type=\"image/avif\">",
"<source",
"\t sizes=\"1920w, 1280w, 640w\" ",
"\t srcset=\"img/imagen.webp 1920w, \n\t\t\t img/imagen-1280.webp 1280w, \n\t\t\t img/imagen-640.webp 640w\" ",
"\t type=\"image/webp\">",
"<source",
"\t sizes=\"1920w, 1280w, 640w\" ",
"\t srcset=\"img/imagen.jpg 1920w, \n\t\t\t img/imagen-1280.jpg 1280w, \n\t\t\t img/imagen-640.jpg 640w\" ",
"\t type=\"image/jpeg\">",
"<img loading=\"lazy\" decoding=\"async\" src=\"img/imagen.jpg\" lazyalt=\"imagen\" width=\"500\" height=\"300\">",
"</picture>"
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment