PHP 8 now supports ImageMagick. Is there a way for me to update my PHP 8 installation so that it includes it?
Or will the ImageMagick compatible version of PHP 8 come baked into Local soon?
PHP 8 now supports ImageMagick. Is there a way for me to update my PHP 8 installation so that it includes it?
Or will the ImageMagick compatible version of PHP 8 come baked into Local soon?
Hey @ddegner ā Welcome to the Local Community Forums, and thanks for bringing this up!
Local doesnāt have an easy way to update the PHP service, but we do have some work lined up to improve our Lightning Services (the various server processes like PHP,MySQL,Nginx/Apache) and Iāve made a note to include adding Imagick with the PHP 8 work.
I donāt have an exact ETA for when this will be release, but in order to streamline communication, Iāve moved this topic to our āFeature Requestsā category so that it can be up-voted to help determine the priority for getting this done!
This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.
Absence of Imagick causing plugin issues.
As everyone is aware by now, Imagick is still NOT included in php 8.x for Local. I have come across a few major plugins, the most prominent being Imagify which no longer work on a local site due to the missing library.
Downgrading to PHP 7.x or below is not an option, and other posts on this forum are either outdated or do not provide a working answer. Iāve tried adding the Imagick dll manually, but to no avail.
Developers, please tell me if there is a reliable way to install/enable imagick for PHP 8.x
With newly installed Local 6.5.2 on Mac OS Catalina I have missing ImageMagick PHP module error in 7.* version line as well (7.3.5, 7.4.30).
It breaks some WordPress plugins and is a regression.
Iām on Linux Mint 21.1, using Local 6.6.0. Installed sites report no imagic module present. I installed imagemagic and php imagic systemwide and tried to add path to the module in php.ini.hbs file but no joy here unfortunately. Is there a way to add systemwide imageic module?
Seconding this. Given it was working in the PHP 7.4 installation itās effectively a regression.
Weāre targetting PHP 8.0 now because obviously WP-Engine (and everybody else) is going to be forcing us there soon and not being able to test or run code that requires imagick under PHP 8.0 is proving to be a brick wall for us.
If itās not seen as a priority to add this back in officially, weād be very grateful if someone could semi-officially document the steps required for us to add this back into the PHP 8.0 build ourselves⦠even if that meant our installation was (for now) unsupported.
Thanks!
The currently bundled PHP libraries have dropped the imagick module
Either:
Following on from a support comment on another recent thread:
Agreed, our goal is that all of those PHP versions should be compiled with the same default set of extensions. Weāll make sure PDO support is added on all versions going forward!
And (I know Iām repeating myself butā¦) make sure that list of extensions includes imagick given that WP core now checks for that & complains if itās not there and plenty of plugins and themes require that functionality.
Itās currently not included in the bundled builds of PHP 8.0.22 or 8.1.9
I know that this has been brought up several times but it feels like itās getting brushed aside a little. It would be great if we could get an acknowledgement of this & know if there are plans around correcting it because at the moment weāre migrating sites out of Local into other solutions in order to support clients that use this and need to be on PHP 8 - a āyes we know and itāll be in the builds for the next point releaseā or āit might make it into the next major releaseā or āweāll add it to the todo list for future considerationā and a timeline would help us know how much effort we should be putting into this migration.
Donāt get me wrong - I am VERY grateful for how much Local has streamlined our WP development (in fact setting up alternative development environments is reminding me just how much itās helped!) but a little feedback on the status here would go a long way. Our live sites on WP Engine all have it included - if youāre wanting to mimic the live site experience then itās an odd thing to remove (and yes we have considered using a WP Engine environment directly for development⦠but itās hardly ideal lol)
Thanks!
Jon
While waiting I installed ImageMagick myself on macOS php 8.1.18 and linked to Local php 8.1.9. Itās working now, so maybe it will help someone. I had homebrew and php 8.1 installed already.
Local terminal:
brew install pkg-config imagemagick
pecl install imagick
You should see something similar to 'Installing ā/usr/local/Cellar/php@8.1/8.1.18/pecl/20210902/imagick.soā. This is the path we need.
Local /conf/php/php.ini.hbs:
Comment lines:
; {{#if intelChipMac}}
; [imagick]
; extension = {{extensionsDir}}/imagick.so
; {{/if}}
Add lines:
[imagick]
extension="/usr/local/Cellar/php@8.1/8.1.18/pecl/20210902/imagick.so"
Restarted Local site and php info now shows ImageMagick number of supported formats: 256.
This fixed my issue.
If you are using zsh, comment these lines under .zshrc file
#export PATH="/opt/homebrew/opt/php@8.0/bin:$PATH"
#export PATH="/opt/homebrew/opt/php@8.0/sbin:$PATH"
Our team really needs local wp to fix the imagick extension on php 8.1!! There are no replacements for the imagick extension for our purposes, and we are forced to update to php 8.1 from 7.4 due to security risks. Our last option is to wait for local wp now. Above solutions do not work @ben.turner @Nick-B
Hi @haydenrust1 - which operating system are you using? I can check with the team and see if we can port the work we recently did on PHP 8.2 back to PHP 8.1.
@austinwendt I am on a mac os. Please see my personal post here for details on my setup: Imagick on PHP 8.1
Need a self install instructions for Windows 10 - I have the module but donāt know how to install it into Local 7.1.0
Any word yet?
Imagick should be available now for PHP 8.2 and weāll get it added to prior versions soon.
@Nick-B Thanks for the reply! Sadly our current stack doesnt allow us to use 8.2 yet, we are stuck with choosing either 8.0 or 8.1 and have landed on 8.1. Making this php switch is due to major security risks from staying on anything below 8.x. Unfortunately without imagick working on 8.1, we have to wait to release this update to production and have to sit in this scary limbo state. I know you said soon, but what kind of timeline are you planning? End of next week? A couple days? A month? Time is against us here and we really need this ASAP. Thank you for all the work you guys are doing!
Hi @haydenrust1 - thanks for the extra info. More for my curiosity - can you explain what youāre using Imagick for, and how it is a blocker in the development of the site? Does it generate errors on the site? What are you seeing when it is missing?
Agreed, I donāt want you staying in a scary limbo state. On getting Imagick working on Apple Silicon Macs in PHP 8.1 - realistically, I imagine it will be a month. We have a few other things weāre working on that we need to finish with PHP 8.2 before we can go back to lower versions.
Another option in the short-term - if you download the Intel macOS build, PHP 8.1.9 has Imagick compiled/linked but it also has issues we need to address. Iām not sure what errors youāre running into, but it is possible running the Intel version (which will be compatible with your machine) would resolve them?