admin管理员组

文章数量:1134249

I need to convert all my wordpress images hosted on S3 to webp format. I need to figure out some way to do it without breaking my site. If I download all the images and convert them to webp and reupload them on S3, will that work or will it break my site because it will be looking for png format and the images will be served in webp format?

I need to convert all my wordpress images hosted on S3 to webp format. I need to figure out some way to do it without breaking my site. If I download all the images and convert them to webp and reupload them on S3, will that work or will it break my site because it will be looking for png format and the images will be served in webp format?

Share Improve this question edited Aug 10, 2023 at 22:07 fuxia 107k38 gold badges255 silver badges459 bronze badges asked Aug 10, 2023 at 12:16 Abdul BasitAbdul Basit 1 1
  • Welcome! This question doesn't have anything to do with WordPress however, and should be asked on a more appropriate StackExchange site. – YourManDan Commented Aug 10, 2023 at 14:23
Add a comment  | 

1 Answer 1

Reset to default 0

You also need to update the database so that the converted images are referenced properly instead of the old ones. If you delete the old format images without updating the database, you will break the site as none of the old images will be found.

The plugin "WebP express" will help with this, but I think it requires both the old and new files to be present. One benefit to using it is that the shrinking number of browsers that do not support webp format will continue to work on your site.

The downside is obviously the additional space that having both old (jpg & png) formats and webp image formats available will use. In testing, my experience was roughly 50% more space was used than when it was just the old format images.

本文标签: amazonConvert all images on S3 to webp format