Good evening everyone!
I am trying to optimize this html/css theme that I will sell in the future. I want it to have very high scores for the google lighthouse test. However, it suggests to improve my performance, I should use next-gen formats like WebP or JP2.
Does anyone know how to work this into a static HTML page?
Thanks so much! 😄
You use the
<picture>element.https://developer.mozilla.org/en-US/docs/Web/HTML/Element/picture
The browser will look at the sources and if it supports one of them, it will render that version of the image. If it doesn't support any of the sources, it will render the fallback
<img>tag.So, just make sure you have the relevant versions of the image available to serve.