Skip to content

Instantly share code, notes, and snippets.

@UeldoTheme
Last active May 10, 2018 18:23
Show Gist options
  • Save UeldoTheme/2b3b37c7675c46701c7cd32747b81aca to your computer and use it in GitHub Desktop.
Save UeldoTheme/2b3b37c7675c46701c7cd32747b81aca to your computer and use it in GitHub Desktop.
Different ways to fix the HTTP image upload errors in WordPress
SetEnv MAGICK_THREAD_LIMIT 1
<?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;
}
?>
define( 'WP_MEMORY_LIMIT', '256M' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment