• Hi,

    Can WordPress support multiple file formats (file types) for automatically resized versions of an image?

    For example, if I wanted to offer web browsers a choice of image format, for compatibility and performance purposes, I might typically want to display an image in the following basic manner:

    <picture>
        <source srcset="image.avif" type="image/avif">
        <source srcset="image.webp" type="image/webp">
        <source srcset="image.jpg" type="image/jpeg">
        <img src="image.jpg">
    </picture>

    Furthermore, just like the default resizing behavior, I would require these to be created when the original image was initially uploaded, each format along with the various resized versions of it, e.g. image.webp, image-150×150.webp, image-300×300.webp etc.

    I realize that this will result in a multiplication of images, but that is not a concern to me in this instance.

    Is there a way to do this?

    Thanks in advance.

    Paul S.

    • This topic was modified 3 years, 3 months ago by Jan Dembowski. Reason: Moved to Fixing WordPress, this is not an Developing with WordPress topic
Viewing 1 replies (of 1 total)
  • In case you are still looking for the answers: I was facing the same issue 5 months back while working on my client’s website which was related to games and involved a lot of images and image sizes. I found a wordpress plugin that worked wonders for me: the name is “ewww image optimizer” by Exactly www and also “webp express” by bjorn Rosell. Give these a try and let me know how these worked for you.

Viewing 1 replies (of 1 total)
  • The topic ‘How to generate multiple file formats of an image?’ is closed to new replies.