• Resolved rose18

    (@rose18)


    I have a lot of png files (with transparent background), and it doesn’t seem to convert png files to webp files. It works for jpg files, but not for png files, what is the issue?

Viewing 8 replies - 1 through 8 (of 8 total)
  • Plugin Author Weston Ruter

    (@westonruter)

    PNG files aren’t converted yet. See https://github.com/WordPress/performance/issues/371

    Plugin Support James Osborne

    (@jamesosborne)

    Just to let you know that PNG conversion is now supported. You’ll find more details by visiting the related GitHub issue. Thank you.

    Thread Starter rose18

    (@rose18)

    Thank you @jamesosborne ! I’ve tested it with an PNG image and it does convert it to webp. However, it’s not using the WEBP files for background images (for all the different image formats). I am using Elementor page builder, and when I set an image for the background, it’s not using the WEBP file.

    Does it support using WEBP for background images?

    Plugin Support James Osborne

    (@jamesosborne)

    @rose18 That depends on how background images work in Elementor. Have you tried to upload the images to your media folder first, and not via Elementor. When selecting your background image in Elementor, you can then select the photo from your media library, which should include the WebP version.

    Thread Starter rose18

    (@rose18)

    @jamesosborne – I tried your way, upload the image to the media library first, then select the background image in Elementor, still doesn’t take the WebP version.

    I’ve also tried that using the Block editor (added a background image to core group), it doesn’t take the WebP version.

    Plugin Support James Osborne

    (@jamesosborne)

    Thanks for the update. I suspect it’s an Elementor block as opposed to a core block. Can you share details of the block you used?

    I did also check this using a cover block and and another themes block that adds background images via CSS, without encountering issues. You’ll see a WebP image added here. I’m happy to check for any block you’re using, just not that you may wish to check with Elementor if it is one of their own blocks.

    Thread Starter rose18

    (@rose18)

    Hi @jamesosborne ,

    It seems to be working, but it’s not working for all images. I’ve used the same images but tested in different dimensions. When I uploaded these images to the WP Media library, some are converted to webp format and some are not converted.

    Working screenshots:

    Not working (same image, but in different size):

    Is there a reason why those are not converted to webp format?

    thanks!

    Plugin Support James Osborne

    (@jamesosborne)

    Thanks for the update @rose18. I suspect that the JPEG images that are not converting may already be optimized, and any conversion wouldn’t result in any file size improvements. In such cases, a newer image format is not generated for these images.

Viewing 8 replies - 1 through 8 (of 8 total)
  • You must be logged in to reply to this topic.