Last active
August 18, 2018 14:53
-
-
Save nszumowski/9d2efd9bd8b73ad22a07c446daf598aa to your computer and use it in GitHub Desktop.
Set Default WordPress Image Editor to GD Library
This file contains hidden or 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 | |
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