再生缩略图即使在原始图像中也找不到原始图像

时间:2019-01-26 14:39:23

标签: wordpress image woocommerce thumbnails

我有一个设置有免费主题的WooCommerce网站,并且我尝试重新生成缩略图,因为它们裁剪错误(高产品图片)。

即使该网站正常运行,我的媒体库也肯定有问题。 从WordPress管理员点击“编辑图片”时,某些图片附件不会显示。其他人可以使用,但我无法为其中任何一个重新生成缩略图:

ERROR: The fullsize image file cannot be found in your uploads directory at myawesomeproduct-full.jpg. Without it, new thumbnail images can't be generated.

这带有HTTP 500错误,通过查看DevTools中的详细错误日志,我看到其中有responseJSON的{​​{1}}。这使我指向https://github.com/Viper007Bond/regenerate-thumbnails/blob/master/includes/class-regeneratethumbnails-regenerator.php#L134,因此"code": "regenerate_thumbnails_regenerator_file_not_found"函数出现问题。

    get_fullsizepath()的服务器中
  • 图像确实存在
  • wp-content/uploads的权限为wp-content/uploads,文件为755
  • 数据库中的图片网址正确无误,请参见this issue支持中的Regenerate Thumbnail plugin
  • 已禁用所有可能有影响的iThemes Security设置,iThemes Security本身已被禁用
  • WordPress debug.log中没有相关错误

编辑
显然,644表中_wp_attached_file字段中的相对文件路径应该是wp_postmeta 不是 wp-content/uploads/myawesomeproduct-full.jpg?我在数据库中手动对其进行了修复,但相对于myawesomeproduct-full.jpg文件夹(而不是WordPress安装文件夹),它已经恢复了原来的状态。

0 个答案:

没有答案