Last active
May 10, 2018 18:23
-
-
Save UeldoTheme/2b3b37c7675c46701c7cd32747b81aca to your computer and use it in GitHub Desktop.
Different ways to fix the HTTP image upload errors in WordPress
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
SetEnv MAGICK_THREAD_LIMIT 1 |
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 | |
add_filter( 'wp_image_editors', 'image_editor_gd_default' ); | |
function image_editor_gd_default( $editors ) { | |
$gd_editor = 'WP_Image_Editor_GD'; | |
$editors = array_diff( $editors, array( $gd_editor ) ); | |
array_unshift( $editors, $gd_editor ); | |
return $editors; | |
} | |
?> |
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
define( 'WP_MEMORY_LIMIT', '256M' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment