Last active
May 24, 2018 19:20
-
-
Save landbryo/b434812dbcb2e539699c5bfd3aa148fa to your computer and use it in GitHub Desktop.
Use this function or something similar to change the image editor it is using. This will often fix media library image upload problems. Helpful resources:
https://developer.wordpress.org/reference/hooks/wp_image_editors/
https://developer.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
/////////////////////// | |
// CHANGE IMG EDITOR // | |
/////////////////////// | |
function landbryo_img_edit($array) { | |
return array( 'WP_Image_Editor_GD', 'WP_Image_Editor_Imagick' ); | |
} | |
add_filter( 'wp_image_editors', 'landbryo_img_edit' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment