0

我试图在我当地的 prestashop 网站上重新生成所有缩略图。我得到了很多文件的这些错误:

Warning: imagecreatefrompng(): '/home/ll/Documents/www/ESI/img/p/2/5/8/258.jpg' is not a valid PNG file in /home/ll/Documents/www/ESI/classes/ImageManager.php on line 358

Warning: imagecopyresampled() expects parameter 2 to be resource, boolean given in /home/ll/Documents/www/ESI/classes/ImageManager.php on line 184

Warning: imagecreatefrompng(): '/home/ll/Documents/www/ESI/img/p/2/5/8/258.jpg' is not a valid PNG file in /home/ll/Documents/www/ESI/classes/ImageManager.php on line 358

Warning: imagecopyresampled() expects parameter 2 to be resource, boolean given in /home/ll/Documents/www/ESI/classes/ImageManager.php on line 184

Warning: imagecreatefrompng(): '/home/ll/Documents/www/ESI/img/p/2/5/8/258.jpg' is not a valid PNG file in /home/ll/Documents/www/ESI/classes/ImageManager.php on line 358

Warning: imagecopyresampled() expects parameter 2 to be resource, boolean given in /home/ll/Documents/www/ESI/classes/ImageManager.php on line 184

Warning: imagecreatefrompng(): '/home/ll/Documents/www/ESI/img/p/2/5/9/259.jpg' is not a valid PNG file in /home/ll/Documents/www/ESI/classes/ImageManager.php on line 358

Warning: imagecopyresampled() expects parameter 2 to be resource, boolean given in /home/ll/Documents/www/ESI/classes/ImageManager.php on line 184

看起来他们已经损坏了......我该怎么办?

谢谢

4

1 回答 1

1

此错误可能是因为文件是(真的!)JPEG 文件而不是 PNG 文件。

要解决此问题,您可以转到 PrestaShop 后台的“首选项”>“图像”并选择“JPG”而不是“PNG”。

此外,您可能需要重新考虑为您的产品图片选择 PNG 扩展名。在许多情况下,它会增加图像的权重而不提供任何改进。

于 2013-06-20T17:21:24.643 回答