How can I remove all broken images

This topic contains 9 replies, has 3 voices, and was last updated by  Joshua Dobbs 6 years, 3 months ago.

We have moved to a support ticketing system and our forums are now closed.

Open Support Ticket
  • Author
    Posts
  • #412610

    Joshua Dobbs
    Expired Member
    Post count: 90

    I’m not entirely sure what caused the issue but i have a lot of broken images in my listings. Is there a tool I can use to remove them? What’s the recommended way to find and remove references to 100’s – 1000’s of broken images?

    #412611

    Guust
    Moderator
    Post count: 29970

    Probably the best idea is to find out what happened, then you can fix it.
    Are the images no longer where you expect them, or is the URL of the images not as you expect them?

    If you send us a few links to the pages where you have the problem, it would be clearer for us.

    Thanks

    #412613

    Joshua Dobbs
    Expired Member
    Post count: 90
    This reply has been marked as private.
    #412615

    Guust
    Moderator
    Post count: 29970

    Is this GD related? Or did you just post the wrong link?
    You could rename the images folder, and then add the correct image where you need it?
    Then delete the renamed images folder once you have only duplicated the required images.

    #412619

    Joshua Dobbs
    Expired Member
    Post count: 90
    This reply has been marked as private.
    #412623

    Alex Rollin
    Moderator
    Post count: 27815

    Hello!

    What happens when you re-save the listing?

    #412684

    Joshua Dobbs
    Expired Member
    Post count: 90

    nothing. Still get a 404 error

    #412690

    Alex Rollin
    Moderator
    Post count: 27815

    Hello again,

    I discussed this a bit with the team. The images are stored in the GD Tables as relative links.

    You could export the table, rebuild a list of links, and script a link checker for them. Once you know which are broken you could then set about with a find and replace in the db, again probably needing a custom script.

    Only the featured images are stored in the media library, so 3rd party plugins could help with those featured images, but not the custom tables.

    CSV export would be the easiest way to start checking them.

    Those are the ideas we came up with in our discussion.

    What do you think? Have you been able to figure out how it happened, or if there is a backup available?

    #412691

    Guust
    Moderator
    Post count: 29970

    All I can think of, is to export all your listings, delete the links to the images and re-import.
    Or look at the exported links to the images, and try finding out where the images are. Maybe there is a backup available.

    It looks very much like all the missing images where added in December and something happened to the /wp-content/uploads/2017/12/ folder.

    #412713

    Joshua Dobbs
    Expired Member
    Post count: 90

    Hi Alex and Guust,

    I recommended the following to the site owner:

    1. Restore from a backup if available
    2. I found that there are some plugins that can detect broken links and images.

    I will also pass along your suggestions.

    Thanks,
    Josh

Viewing 10 posts - 1 through 10 (of 10 total)

We have moved to a support ticketing system and our forums are now closed.

Open Support Ticket