[wp-trac] [WordPress Trac] #39262: Fall back to ImageMagick command line when the pecl imagic is not available on the server
WordPress Trac
noreply at wordpress.org
Fri Dec 16 23:02:04 UTC 2016
#39262: Fall back to ImageMagick command line when the pecl imagic is not available
on the server
--------------------------------+------------------------------
Reporter: Hristo Sg | Owner:
Type: enhancement | Status: new
Priority: normal | Milestone: Awaiting Review
Component: External Libraries | Version: 4.7
Severity: normal | Resolution:
Keywords: | Focuses:
--------------------------------+------------------------------
Comment (by mikeschroder):
Replying to [comment:3 danielkanchev]:
> Right now in the WP core ImageMagick is used just because it supports
more file types then GD. That is why in WP 4.7 we can now generate
thumbnails of PDF files.
<snip>
> - Better support for different environments. The user doesn't care of
the host has ImageMagick or not. The user just wants to see the thumbnail
generated and when ImageMagick is not available this will not happen.
Hey there!
Wanted to address these two notes. Imagick/ImageMagick is used by default
not because it supports more types (although this does help with PDF, for
sure) but because it is better at all of the operations that GD can do,
and is more customizable as to how it does those operations.
It enables smaller image creation at better qualities, and allows for
maintaining EXIF/IPTC information, which includes color profiles.
In general, it's much better at handling images than GD.
In terms of expanding the support of PDF thumbnail creation, and the
addition of an image editor that supports creation via the shell:
First, thanks so much for writing this! It's something that was considered
early on, but was decided against, both due to time constraints, and due
to not wanting to shell out.
I tend to agree with @dd32 on this point, and don't think that the
increase in compatibility is worth adding something that shells out to
core. This is mostly because at this point, I find that most hosts that
put WordPress as a priority understand that Imagick is key for WordPress
handing images as best as it can, and tend to include it with their plans.
I see the performance benefit, but given that this is only affected while
users are uploading images, the additional surface seems like a bigger
issue than reducing this load.
I would absolutely love to see this in plugin form! Part of the reason
that PDF thumbnail creation, and, indeed, `WP_Image_Editor` was written as
it is is so that plugins that add `WP_Image_Editors` like yours, or the
one written by @gitlost can be included, and WordPress will choose to use
it for image operations.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/39262#comment:5>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list