You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Oct 13, 2020. It is now read-only.
Currently the Imagick editor will only be used if GD is not available for some reason. Given that GD is pretty much a given with most PHP installs this effectively means ImageMagick won't ever be used.
This may be intentional? If it is then please feel free to close this issue, but I'd have expected WPThumb to work similarly to WP core where ImageMagick is used as a preference whenever it's available.
The function used by WordPress to return an appropriate image editor (https://core.trac.wordpress.org/browser/tags/4.2.2/src/wp-includes/media.php#L2558) simply returns the first editor to match all provided arguments, because WPThumb sets WP_Thumb_Image_Editor_GD as the first editor to be checked against it will almost always be returned.
The issue is caused by the order you add the editors to the $editors array right at the bottom of wpthumb.php. It would be a quick fix to swap the order which would make WP_Thumb_Image_Editor_Imagick the default if it's available.
I'd be happy to make a PR for that change if it would help?
The text was updated successfully, but these errors were encountered:
Currently the Imagick editor will only be used if GD is not available for some reason. Given that GD is pretty much a given with most PHP installs this effectively means ImageMagick won't ever be used.
This may be intentional? If it is then please feel free to close this issue, but I'd have expected WPThumb to work similarly to WP core where ImageMagick is used as a preference whenever it's available.
The function used by WordPress to return an appropriate image editor (https://core.trac.wordpress.org/browser/tags/4.2.2/src/wp-includes/media.php#L2558) simply returns the first editor to match all provided arguments, because WPThumb sets
WP_Thumb_Image_Editor_GD
as the first editor to be checked against it will almost always be returned.The issue is caused by the order you add the editors to the
$editors
array right at the bottom of wpthumb.php. It would be a quick fix to swap the order which would makeWP_Thumb_Image_Editor_Imagick
the default if it's available.I'd be happy to make a PR for that change if it would help?
The text was updated successfully, but these errors were encountered: