WordPress.org

Make WordPress Core

Opened 3 months ago

Last modified 3 months ago

#52766 new enhancement

WP_Image_Editor_Imagick checks for version number but ImageMagick in several cases reports it wrong

Reported by: idad5 Owned by:
Milestone: Awaiting Review Priority: normal
Severity: minor Version:
Component: Media Keywords:
Focuses: Cc:

Description

ImageMagick obviously isn't very consistent in reporting version number to PHP.

See:
https://www.php.net/manual/de/imagick.getversion.php (last comment)
https://github.com/dompdf/dompdf/issues/1296

I myself came across it on a windows server with a very new PLEC DLL version, but as far as my research went it concerns more cases.

WP_Image_Editor_Imagick::test checks vor a version number. This test fails if Imagick reports a usless version (@PACKAGE_VERSION@ ) in my case.

I commented out the version test in the class-wp-image-editor-imagick.php and everything works just fine. The check is for a very old version and checking for a version number instead of features (or in addition) seems not the best way anyhow. Especially so with Imagemagick and ist track record...

I'm not an expert on servers but it seems to me that there might be a way to improve the class to make features like PDF thumbnails available on more systems that can support it.

Change History (1)

This ticket was mentioned in Slack in #core-media by antpb. View the logs.


3 months ago

Note: See TracTickets for help on using tickets.