1

I would like to ask how to convert or transform image format to webp.

Based on Craft CMS Documentation 3.x, you can set the image format to jpg, png, gif and webp but there is no webp available in my CP.

https://craftcms.com/docs/3.x/image-transforms.html#defining-transforms-from-the-control-panel

I would like to ask how can I convert it to webp, should I need install driver in my server?

Thank you.

2 Answers 2

4

If you're not seeing WebP as a format option, your server doesn't support webp. As per the server requirements for Craft, you need either of the PHP extensions for images, GD or ImageMagick. Both of those can be compiled / installed with or without WebP (though a standard installation should include WebP by default by now).

If you're working locally or on a server you control, make sure to install/compile ImageMagick with WebP support. If you're using managed hosting, contact your server provider to do it for you.

1
  • 1
    Thank you. Though I am having a hard time installing ImageMagick on my local but it worked on GD2. Dec 16, 2021 at 3:25
-4

our plugin will handle this among other things. Check it out here. https://plugins.craftcms.com/one-plugin-fields

Effectively it'll transform the image, render it per target resolution and optimise. All while giving you the option for fallback images. So safari or edge wont break your site.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.