2013-06-20 19 views
0

我試圖重新生成與我的本地prestashop網站上的所有縮略圖。而我得到了很多文件的這些錯誤:prestashop如何處理錯誤:imagecreatefromjpeg():不是一個有效的PNG文件

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 

看起來他們已經損壞......我該怎麼辦?

感謝

回答

1

這個錯誤可能是因爲文件是(真的!)JPEG文件,而不是PNG文件。

要解決此問題,您可以在'首選項'>'圖像'中轉到PrestaShop後臺,然後選擇'JPG'而不是'PNG'。

此外,您可能還想重新考慮爲您的產品圖片選擇PNG擴展名。在許多情況下,它會增加圖像的重量而不提供任何改進。

相關問題