Answers for "Serve images in nextgen formats webp"

0

Serve images in nextgen formats webp

<picture>
  <source srcset="img/awesomeWebPImage.webp" type="image/webp">
  <source srcset="img/creakyOldJPEG.jpg" type="image/jpeg"> 
  <img src="img/creakyOldJPEG.jpg" alt="Alt Text!">
</picture>
Posted by: Guest on December-11-2020
0

Serve images in nextgen formats webp

.no-webp .elementWithBackgroundImage {
  background-image: url("image.jpg");
}

.webp .elementWithBackgroundImage{
  background-image: url("image.webp");
}
Posted by: Guest on December-11-2020

Browse Popular Code Answers by Language