Support » Fixing WordPress » Images not showing

  • Hi,
    Our site was hacked recently, and we’re in the process of fixing that, but in the scramble to fix it we’ve lost a bunch of images – which is a problem for a news site. I’ve tried uploading them again via FTP hoping that the links to the images would still work. But they only partly work. For example, if you have a look at http://www.thewesterner.com.au/?p=9572 you can see there’s a missing image, but if you click on the broken link icon, the image displays on a new page.

    Does anybody know what the problem is? WE have hundreds of images to get back up on our site, so if we can’t do it through FTP (or some other way of doing it in bulk), then it’s going to be a very tough job that could take us weeks.

    Any help very appreciated.

    Thanks,
    D

Viewing 2 replies - 1 through 2 (of 2 total)
  • Basically when you upload an image e.g.
    web_WOMBAT-WARRIORS-400.jpg

    Depending on how wordpress is setup it created a series of resized versions for optimisation and renames them e.g. in this case:
    web_WOMBAT-WARRIORS-400-400×289.jpg

    The option might be if you are happy to take the performance hit is to edit your theme template to use the original image not a resized version.

    Its tricky since your media is uploaded into date based folders, some other members might have some tricks. Looks like you use a couple of additional sizes:
    120×67.jpg
    400×289.jpg

    You could i guess change wordpress to not use date based folders for media in settings.

    Upload all your missing images (which will create a big list with the resized versions) you can then change it back to date based and FTP in and move the 3 versions of each file to the correct date.

    Its a faff and you should know media in WP only appears in the media library owing to an associated database entry (like posts) so the above solution creates an issue whereby you’ll have duplicate entries in the DB for the images e.g. the orignals and the ones you just uploaded to replace them.

    I better option might be to use an image resizer desktop application to resize all you lost images and auto-rename them as needed then FTP them up.

    As i said other members might have a better solution as you can realise your issue is actually 3x worse than you thought 🙁

    Thanks latro666 for those ideas – they all look very time consuming. I’m beginning to think to think we’re simply going to have to spend many hours replacing images. Ugh!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Images not showing’ is closed to new replies.