New in CWP Edge-LatestFree with every CWPpro licenceWebsites up to 300x faster

CWP now includes LSPHP, LSAPI-Cache and CWP Cage at no extra cost with all CWPpro licences. The LSAPI-Cache plugin is integrated into our WordPress and other script installers, and CWP Cage gives every user complete isolation. Available now in the CWP Edge-Latest version.

Get CWPpro ›

Imagick and WebP+Avif support

Started by itniels, February 11, 2025, 08:04:33 PM

Previous topic - Next topic

itniels

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.

cyberspace

#1
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

itniels

@cyberspace Thank you for the reply, do you know if this will interfere with updating PHP later on or get overwritten? :)

cyberspace

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.

itniels

@cyberspace, thank you so much :) I will give it a try.