Author Topic: Imagick and WebP+Avif support  (Read 219 times)

0 Members and 1 Guest are viewing this topic.

Offline
*
Imagick and WebP+Avif support
« on: February 11, 2025, 08:04:33 PM »
Hi, Is there a way to enable WebP and AVIF support in Imagick for CWP Version selectors?
This is relevant for both PHP and PHP-FPM please.

I am on CentOS 7 and AlmaLinux 8 with CWP Pro license.

Online
***
Re: Imagick and WebP+Avif support
« Reply #1 on: February 11, 2025, 09:16:23 PM »
I think it can be done. To do it you need:

1. Install packages libavif-devel.x86_64, libwebp-devel.x86_64, ImageMagick-devel.x86_64
2. Download sources of imagick here:
https://pecl.php.net/package/imagick
and recompile imagick from sources for the php version you want to compile imagick for.
3. extract
4. phpize
5. configure
6. make
7. make install

Check this thread to learn how to update/recompile imagick:
http://forum.centos-webpanel.com/updates/how-to-update-imagick/msg48794/#msg48794
« Last Edit: February 11, 2025, 09:33:01 PM by cyberspace »

Offline
*
Re: Imagick and WebP+Avif support
« Reply #2 on: February 12, 2025, 11:05:39 AM »
@cyberspace Thank you for the reply, do you know if this will interfere with updating PHP later on or get overwritten? :)

Online
***
Re: Imagick and WebP+Avif support
« Reply #3 on: February 12, 2025, 12:48:06 PM »
I haven't tested it but I think the extension should support the extra image extensions even if you recompile php via CWP some day.

Offline
*
Re: Imagick and WebP+Avif support
« Reply #4 on: February 14, 2025, 09:27:55 PM »
@cyberspace, thank you so much :) I will give it a try.