[wp-trac] [WordPress Trac] #50630: imagick image editor does not support streams

WordPress Trac noreply at wordpress.org
Sat Jul 11 10:16:48 UTC 2020


#50630: imagick image editor does not support streams
--------------------------+-----------------------------
 Reporter:  p00ya         |      Owner:  (none)
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  Awaiting Review
Component:  Media         |    Version:  trunk
 Severity:  normal        |   Keywords:
  Focuses:                |
--------------------------+-----------------------------
 The imagick image editor (in particular the `load` and `save` methods) do
 not work with streams.

 The use case for having the image editor work with streams is when using
 plugins like https://wordpress.org/plugins/gcs/ that register a custom
 stream handler (in that case for "gs://" URLs) and add a filter to
 `upload_dir` so that uploads result in RPCs to external services.

 There are a few reasons the original code didn't work:

 * `realpath` doesn't work with streams
 * `Imagick::readImage` and `Imagick::writeImage` expect filenames, not
 URLs

 I have a working patch which I'll upload to this ticket.

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


More information about the wp-trac mailing list