Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Switch to WP_Image_Editor_GD
/**
@@ Sửa lỗi Post-Processing of Image Failed WordPress
@@ Sử dụng module GD Library để xử lý hình ảnh Wordpress
**/
function wpb_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', 'wpb_image_editor_default_to_gd' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment