Skip to content

Instantly share code, notes, and snippets.

@nszumowski
Last active August 18, 2018 14:53
Show Gist options
  • Save nszumowski/9d2efd9bd8b73ad22a07c446daf598aa to your computer and use it in GitHub Desktop.
Save nszumowski/9d2efd9bd8b73ad22a07c446daf598aa to your computer and use it in GitHub Desktop.
Set Default WordPress Image Editor to GD Library
<?php
function xxx_image_editor_default_to_gd( $editors ) {
$gd_editor = 'WP_Image_Editor_GD';
$editors = array_diff( $editors, array( $gd_editor ) );
array_unshift( $editors, $gd_editor );
return $editors;
}
add_filter( 'wp_image_editors', 'xxx_image_editor_default_to_gd' );
// from https://www.wpbeginner.com/wp-tutorials/how-to-fix-the-http-image-upload-error-in-wordpress/
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment