[wp-trac] [WordPress Trac] #52766: WP_Image_Editor_Imagick checks for version number but ImageMagick in several cases reports it wrong

WordPress Trac noreply at wordpress.org
Wed Mar 10 18:10:22 UTC 2021


#52766: WP_Image_Editor_Imagick checks for version number but ImageMagick in
several cases reports it wrong
-------------------------+-----------------------------
 Reporter:  idad5        |      Owner:  (none)
     Type:  enhancement  |     Status:  new
 Priority:  normal       |  Milestone:  Awaiting Review
Component:  Media        |    Version:
 Severity:  minor        |   Keywords:
  Focuses:               |
-------------------------+-----------------------------
 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.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/52766>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list