L
L
ligisayan2021-11-24 10:25:47
Images
ligisayan, 2021-11-24 10:25:47

How to convert images to webp and download them from cloud server?

Hello! There is a site on wordpress with the installed plugin for saving images on the cloud server WP Offload Media .
Now I have a need to switch to using .wepb images in browsers where it is supported. To do this, I installed the WebP Express
plugin , which additionally converts images to the specified format. But, there are 2 questions of linking them together: 1) If you disable WP Offload Media and set the same settings , then everything works fine with the local folder, in this form the plugin gives


619de666cdcff431219506.png
619de67947e1b162004146.png

<picture>
    <source srcset="https://test.site/wp-content/uploads/2021/06/def_2.png.webp" type="image/webp">
    <img src="https://test.site/wp-content/uploads/2021/06/def_2.png" alt="" class="webpexpress-processed">
</picture>

But, if you enable WP Offload Media to load from the server, then it interrupts the html structure
<img src="https://test-wp.storage.googleapis.com/wp-content/uploads/2021/11/041343236/def_2.png" alt="">

How to make the structure be from WebP Expres and the link is taken from the WP Offload Media cloud ?
2) To send the .wepb format to the cloud , you need to connect the
as3cf_object_meta, as3cf_attachment_file_paths filters of the amazon-s3-and-cloudfront-tweaks add-on plugin , but this only works when loading new images in the media library, but what about those that WebP Expres converted , but they have already been loaded before?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question