Php wp获取图像编辑器返回wp错误
我使用aq_resize类来调整图像大小并保存它们,但是在aq_resize.php中有一个wordpress函数Php wp获取图像编辑器返回wp错误,php,wordpress,image,Php,Wordpress,Image,我使用aq_resize类来调整图像大小并保存它们,但是在aq_resize.php中有一个wordpress函数 ($editor = wp_get_image_editor( $img_path )) 始终返回错误(wp_错误) 以下是故障代码的一部分: $editor = wp_get_image_editor( $img_path ); if ( is_wp_error( $editor ) || is_wp_error( $editor->resize( $width, $h
($editor = wp_get_image_editor( $img_path ))
始终返回错误(wp_错误)
以下是故障代码的一部分:
$editor = wp_get_image_editor( $img_path );
if ( is_wp_error( $editor ) || is_wp_error( $editor->resize( $width, $height, $crop ) ) )
return false;
$resized_file = $editor->save();
你能告诉我们错误吗?它只返回“wp_error”而不是wp_image_editor的实例。你能提供一个屏幕截图让我看看发生了什么吗?你的服务器上是否打开了“GD和/或ImageMagick库”!