How To Find All Products With Broken Images In Prestashop

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:



15 comments

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

  2. 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
    Tran

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

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

  4. Jonathan,

    The eight line is our code is

    and here there is no “foreach”.

  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. Syed,

    Yes, you are absolutely right

    better to replace with

  7. Hi,

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

    thanks

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

  9. 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….

Post a new comment

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