Created
September 16, 2021 19:46
-
-
Save adamsilverstein/c8b5d0145aeda7fe0a04e4573f2c7c32 to your computer and use it in GitHub Desktop.
Prefer GD over Imagick when choosing the default image editor.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Prefer GD over Imagick. | |
* | |
* @wordpress-plugin | |
* Plugin Name: Prefer GD over Imagick. | |
* Description: Switches the default image editor choice order. | |
* Plugin URI: | |
* Version: 1.0.0 | |
* Author: Adam Silverstein, Google | |
* License: Apache License 2.0 | |
* License URI: https://www.apache.org/licenses/LICENSE-2.0 | |
*/ | |
add_filter( | |
'wp_image_editors', | |
function() { | |
return array( 'WP_Image_Editor_GD', 'WP_Image_Editor_Imagick' ); | |
} | |
); |
this should now be fixed in wp core
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Okay, very well! Thanks so much for the follow-up.
Do I need to hook into anything at all, or should I expect everything to "just work" merely by patching core in this way?
(I know that patching/hacking core is just for trying stuff as opposed to calling it a durable fix :D )