r/csshelp • • Jun 14 '23

Request JPG to WebP

Hey! I’ve been trying to figure this out. I have a Wordpress site https://www.handycookbook.com and the load speeds are horrible due to displaying JPG images. I added a plug-in to the site which converts all of the images to WebP. However, if you look at those images that show at the very top of the home page they still display as JPG. The reason being that they are being loaded as background images through CSS which plugins cannot correct. I am trying to find how to make the adjustment to the CSS to display WebP images. Can anyone lend a hand please??

1 Upvotes

4 comments sorted by

1

u/[deleted] Jun 14 '23

[removed] — view removed comment

1

u/HandyCookbook Jun 14 '23

All of my images already have WebP versions made automatically. There is a plug-in on the site that automatically displays WebP automatically as well. The issue is that that specific spot of the website is using CSS to load those pictures as background images in JPG format. Do you know how to adjust the CSS to display WebP for a background image when possible?