我试图在我当地的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
好像他们已经腐败了......我该怎么办?
感谢
答案 0 :(得分:1)
这个错误可能是因为文件是(真的!)JPEG文件而不是PNG文件。
要解决此问题,您可以在“偏好设置”>中转到PrestaShop后台办公室。 '图片'并选择'JPG'而不是'PNG'。
此外,您可能需要重新考虑产品图片的PNG扩展名的选择。在许多情况下,它会增加图像的重量而不会提供任何改进。