Skip to content

Instantly share code, notes, and snippets.

@adamsilverstein
Created September 16, 2021 19:46
Show Gist options
  • Select an option

  • Save adamsilverstein/c8b5d0145aeda7fe0a04e4573f2c7c32 to your computer and use it in GitHub Desktop.

Select an option

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' );
}
);
@adamsilverstein
Copy link
Copy Markdown
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