Images not displaying after using WP Smush

This morning, I've smushed some of the images on one of our blog sites, but now they're showing as broken links on the frontend and they've disappeared from the media library on the back end. They are still in the folder when I look in filemanager though.

Also, I tried to "regenerate the thumbnails" but all the "broken images" were skipped.

  • Dimitris

    Hello there Guy,

    hope you're doing good today! :slight_smile:

    I've already contacted our Second Level Support team on this, as it seems that features images are using only the path instead of the path and filename, so they have
    https://www.YOURDOMAIN.com/wp-content/uploads/2017/11/
    instead of
    https://www.YOURDOMAIN.com/wp-content/uploads/2017/11/FILENAME.jpg
    We'll keep you posted here, about any further insights we may have about it.

    You could set the following set of plugins to surpass that, so images will be visible in Media library again and any thumbnails that may be missing will be regenerating.
    https://wordpress.org/plugins/add-from-server/
    https://wordpress.org/plugins/regenerate-thumbnails/
    https://wordpress.org/plugins/force-regenerate-thumbnails/ (this can be helpful to remove thumbnail versions that aren't used anymore).

    Prior to that, I'd advise to backup your site though, our Snapshot plugin can help you on that, and also update Smush plugin itself. :wink:

    Warm regards,
    Dimitris

  • Guy

    Hi Dimitris!

    I'll back the site up and try to reestablish the images using the plugins suggested.

    On a side note, I've not had much success with Snapshot on account of it using up too much resource when backing up media files, causing a 508 error before completing the process. So currently my backups are done server-side by Softaculous. I'd like to bring Snapshot in as my preferred backup method though so will deal with that when this issue is resolved.

  • Guy

    Hi Dimitis,

    I've tried the Add to Server plugin but unfortunately when I've selected the images and attempted to import them, but it doesn't seem to be successful. It either gives me a blank screen after selecting files and hitting Import, or it progresses part way through the import and than stalls before stopping.

    Support access is granted if you'd like to take a look and see what is happening and to make sure it's nothing I'm doing wrong.

  • Guy

    Hi Dimitris,

    I've attempted a couple of times with the Add From Server, even selectively choosing a set of images from a blog which I know isn't being displayed but still no joy.

    I've increased the LVE limit on the account to try and negate any out-of-memory issues, raised the IO limit but I'm having no joy. I have a backup from a week previous to the issue occurring so can roll back to that and re-up the two blogs which have been posted since then, just so I can get the site back to looking how it should.

    Would it be helpful for me to make available a backup of the site both before and after the issue so you can continue to investigate?

  • Guy

    Morning Dimitris,

    Due to a fall in SE rankings on account of the number of 404s on the page because of the images, I have had to restore the website to a previous backup.

    After carrying out this restore, I ran WP Smush again which broke the links once more. I have restored a second time and will this time not run the Smush.

    I have backups from prior to and after the problem which I can send to you for examination/testing but I need the site to be displaying the images to preserve our rankings.

  • Dimitris

    Hello there Guy,

    I really appreciate the feedback and cooperation here! :slight_smile:

    Could you please share these backups with us, so we could further investigate this?
    As this is public forum, you should send us your details through our safe contact form https://premium.wpmudev.org/contact/#i-have-a-different-question using this template:

    Subject: "Attn: Dimitris"
    - backup before broken links
    - backup with broken links
    (you may have to upload these in a service like Dropbox and send us the shareable links)
    - any special instructions on how to restore these in a testing site of ours (have these been made via a plugin, like Snapshot?)
    - link back to this thread for reference
    - any other relevant urls

    Keep in mind the subject line as ensures that it gets assigned to me.
    Warm regards,
    Dimitris

  • Dimitris

    Hello there Guy,

    hope you're doing good today and really appreciate the cooperation here! :slight_smile:

    I've just finished some tests and unfortunately couldn't reproduce the same issue.
    I first migrated your working backup into a testing live site,
    deactivated all plugins apart from Smush and WPMUDEV Dashboard,
    updated Smush to latest release (v.2.7.7),
    activated the "Auto-convert PNGs to JPEGs (lossy)" option in Smush settings,
    bulk smushed all images and there were no broken image link.

    I then tried to also "Resize my full size images" using the largest image size reported in Smush settings, still no avail, all seem to work just fine.

    I'm going to make couple more tests, this time including the remaining plugins I've excluded at the beginning of this and will let you know here about my findings.

    Warm regards,
    Dimitris

  • Dimitris

    Hello there Guy,

    I just made another test and I was still unable to replicate this issue in a local site of mine.
    What I did:
    - migrated your working site
    - updated Smush Pro to latest version (v.2.7.8)
    - I enabled both "Auto-convert PNGs to JPEGs (lossy)" and "Resize my full size images" options and bulk smushed all images

    I wonder if latest Smush version has some fixes on this, even though there's nothing relevant in changelog. Would you mind to make a test like I did above?
    Or, have you tried to migrate and bulk smush in another server of yours? You can also use a local server for that, just in case this is something server-related that we miss....

    Warm regards,
    Dimitris

  • Ari

    Hey Guy

    Hope you are fine today!

    It seems some server related issue, I also tried to replicate the issue in my local test site, but I couldn't. It just works fine. That's why I'm thinking that it's your server related issue.

    I'm sorry for the inconvenience you are facing, since it sound server related issue, I'm wondering if you could create a staging version of your site on same server, with same PHP and all configurations, since it's the only way now to replicate and fix the issue.

    Once you are done with staging version, please send me the login details with FTP credentials through our secure contact form: https://premium.wpmudev.org/contact/#i-have-a-different-question
    Using the below template:

    Subject: "Attn: Ari"
    - WordPress admin (login url/username/password)
    - FTP credentials (host/username/password)
    - cPanel/Plesk credentials (host/username/password)
    - link back to this thread for reference
    - any other relevant urls

    Keep in mind the subject line as ensures that it gets assigned to me.

    === How to create staging version ===

    In case, if you need more information about how to create staging version of your site.

    Usually there are 3 options:

    1) You can do that with hosting, if your hosting provide this feature.
    2) You can use tools like Snapshot Managed Backups (or Duplicator, All-in-One WP Migration plugins)
    3) You also can do that manually - here is a guidance to do so: http://www.wpexplorer.com/migrating-wordpress-website/

    Let me know what do you think!

    Best Regards,
    Ari