Get Free Audit

How To Find All Products With Broken Images In Prestashop

Nov 26, 2012

1739 Alex Simonchik

How To Find All Products With Broken Images In Prestashop

I have developed a script here for you to find and fix all products with broken images in your Prestashop store:

Igor Dragun
Partner With Us Looking for a partner to grow your business? We are the right company to bring your webstore to success. Talk to Igor


  1. I want to show images with respect to color in categories page
    for example i added a product in Men categorie with different two color i want to display one one picture from each color category page….

  2. Murtaza, if your file is in the main directory then don’t change the path. Other way begin the path from the root directory.

  3. Hi,

    I am not understanding how to add code what is file name or how to include_once.Please guide me.


  4. Syed,

    Yes, you are absolutely right

    better to replace with

  5. Just tried this script and it finds products with image entries in database for images which do not exist in the filesystem.

    The only catch is that it needs to use the prestashop variable for shop prefix or people should replace the “ps_” to shop specific prefix.

  6. Jonathan,

    The eight line is our code is

    and here there is no “foreach”.

  7. Thanks for the code. I got this error when I ran it:

    Warning: Invalid argument supplied for foreach() in on line 8

  8. Hi Alex,
    Very nice scripts, I think you you have a solution how to massive delete products from id for example 1000-3000 and their images from /img
    Best regards

  9. The code should be located in the Prestashop root directory or elsewhere. In the latter case, however, there are other paths for include_once.

Post a new comment

BelVG Newsletter
Subscribe to our mailing list and get interesting stuff and updates to your email inbox.
Email *