Skip to content
This repository has been archived by the owner on Oct 13, 2020. It is now read-only.

Imagick never used as editor #126

Open
sleepingkiwi opened this issue Jun 3, 2015 · 0 comments
Open

Imagick never used as editor #126

sleepingkiwi opened this issue Jun 3, 2015 · 0 comments

Comments

@sleepingkiwi
Copy link

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?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant