[wp-trac] [WordPress Trac] #54039: site health can probably do better job at detecting if imagick supports PDF

WordPress Trac noreply at wordpress.org
Mon Aug 30 15:20:22 UTC 2021


#54039: site health can probably do better job at detecting if imagick supports PDF
-------------------------+-----------------------------
 Reporter:  mark-k       |      Owner:  (none)
     Type:  enhancement  |     Status:  new
 Priority:  normal       |  Milestone:  Awaiting Review
Component:  Media        |    Version:
 Severity:  normal       |   Keywords:
  Focuses:               |
-------------------------+-----------------------------
 The current code is


 {{{
 if ( function_exists( 'exec' ) ) {
     $gs = exec( 'gs --version' );
     if ( empty( $gs ) ) {
 .....
 }}}

 `exec` is probably disabled on many hosts which means the test will not
 run at all.

 From looking at
 https://www.drupal.org/project/media_thumbnails/issues/3207465 it seems
 that imagick reports whether it supports PDF format as part of its phpinfo
 output. Maybe there is a direct API to get th information as well.

 If this is not robust enough, maybe the test should try to generate an
 image from a test pdf file.

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


More information about the wp-trac mailing list