Skip to content

Instantly share code, notes, and snippets.

@adamsilverstein
Created September 16, 2021 19:46
Show Gist options
  • Save adamsilverstein/c8b5d0145aeda7fe0a04e4573f2c7c32 to your computer and use it in GitHub Desktop.
Save adamsilverstein/c8b5d0145aeda7fe0a04e4573f2c7c32 to your computer and use it in GitHub Desktop.
Prefer GD over Imagick when choosing the default image editor.
<?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' );
}
);
@scofennell
Copy link

scofennell commented Nov 19, 2021

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 )

@adamsilverstein
Copy link
Author

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