My customer asked me to convert all images used in the app to .webp format. The thing that confuses me is the lazyload that I'm using for all images. Will lazyload work with .webp formats and what can you suggest me to convert all images to .webp?
@Snapey Okay, I will easily convert all images to .webp with this command line tool but what about the lazyload? Will it work with .webp format? Also what about the uploading in .webp? There are many forms where users can upload photos in the app. How will these photos be converted to .webp?
@Snapey I see that this command line tool can't decode .svg files. I guess only .jpg, .jpeg, .png to .webp is supported. Any ideas what to do with the .svg images?
personally I think Lighthouse favours WebP too much - probably just to promote their own format.
I don't know of a way of converting uploads (which will be in png or jpg probably) into webp. It might be possible using exec to shell to the command line conversion tool, but the gains are probably not worth the energy
@Snapey Thanks for your opinion. My customer is categorical about converting everything to .webp. That's how you convert the uploaded image into .webp with Image Intervention