Imagick on PHP 8.1

What issue or error are you experiencing?

After updating my sites to PHP 8.1, imagick is no longer working properly due to local wp not having the correct version of the extension installed. I confirmed this by printing my php info. Whatever version of imagick local wp uses, it isnt the right one and does not allow it to be used properly on php 8.1.


What steps can be taken to replicate the issue? Feel free to include screenshots, videos, etc

Trying to access the readImageBlob method within the imagick extension renders as a fatal error stating: “NoDecodeDelegateForThisImageFormat `’ @ error/blob.c/BlobToImage/460”. After much research, Ive tried everything I could find on google with no success.

I have tried changing the extension path in my php.ini file in order to reflect the newest PECL installation of imagick on my local machine, but this breaks its even worse and says that the extension doesnt even exist. Due to being on an M1, my homebrew path differs from those on an intel chip. Below is the path I used and confirmed is correct for my local machine, I can literally access the imagick.so file in my terminal! I believe this should be the fix, but it doesnt work.

please note that I got rid of the intelchip if check here, what you see is how it exists in my ini file:
[imagick]
extension = “/opt/homebrew/Cellar/php@8.1/8.1.20_1/pecl/20210902/imagick.so”

Ultimately, local wp should fix this problem on their end so that we engineers dont have to suffer through this problem. In the mean time, what short term fix can I apply here? We are currently on version 7.4 and need to get off of it ASAP, but our sites break due to local wp’s wrong imagick versioning.


System Details

  • Local Version:
    7.0.2
  • Operating System (OS) and OS version:
    Apple M1 Pro 2021
    MacOS Ventura version 13.2

@haydenrust1

Imagick isn’t compiled universally for all configurations. We are working on getting this more widely adopted in the future but for right now this is expected behavior.

You can vote, follow and comment on this Feature Request here:

1 Like

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.