Solucionar problema de subida de imágenes en HostGator

Solution 5: Make GD Library Your Default Image Editor

Speaking of magic, did you know WordPress ships with two image editors? That’s right, WordPress uses either Imagick or the GD Library to process images. While they are both great, Imagick is notorious for exhausting the available memory and causing the HTTP error.

To circumvent this problem, you need to make GD Library your default editor. How? Just drop this code to your theme’s functions.php file:

  • function hs_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’, ‘hs_image_editor_default_to_gd’ );<code></code>

Save your changes and try to upload the image again. If the HTTP error persists, revert the code change and try the next solution.

 

Fuente: https://www.hostinger.com/tutorials/http-error-when-uploading-images-to-wordpress

wordpress async-upload.php error hostgator