[WP Smush Pro] Bulk Restore Original Images Script

Hello,

Smush Pro is not working well with the images on our website and it's making them to pixelated, therefore, we would like to restore the original unoptimized images on the website.

We would like to ask for the bulk restore script as what we have read in the article below:
https://premium.wpmudev.org/forums/topic/restore-originals-wp-smush-pro

We have enabled the "Store a copy of my full size images" option.

Looking forward to your response.

  • Predrag Dubajic
    • Support

    Hi xman888,

    Hope you're doing well.

    I'm afraid that script is two years old and since then there were a lot of changes in Smush so it doesn't work anymore, I will, however, ping our devs about this so they can check if it can be adjusted for the current version.

    In the meantime, could you tell me which of your images are getting pixelated as we would like to check why this happened in the first place?

    Best regards,
    Predrag

  • xman888
    • WPMU DEV Initiate

    Hello Predrag,

    I remembered filling up a form before posting this provide the website. If you needed the details again, is there a way to provide them without posting it publicly on the forum?

    Anyways, on the website, especially on the Projects page, the images were pixelated.

    When we disabled Smush Pro and uploaded an image as a test, it is now not pixelated. We have experienced it from a previous website but since there were not many images on that we just reuploaded all the image. But for this website, there are tons of images so uploading them again would be a hassle.

    We have also tried the Force Thumbnail Regenerate method but it did not work.

    We have enabled the support on WPMU DEV if that would help.

    Also, is there an ETA for the Bulk Image Restore?

    We look forward to your reply.

  • Predrag Dubajic
    • Support

    Hi xman888,

    We have access to your site and I have checked it previously but I couldn't see any pixelated images so I was wondering actually on which page I could see it.
    So I had a look at your Projects page and I'm guessing that you're referring to Enclave image since that one looks most pixelated to me, is that correct?

    I was looking at that image and it seems that the original image is pixelated as well so it's not something that was affected by Smush.
    You can check this by opening optimized and original image on your site.
    You can see the original here:
    http://YOUR_DOMAIN/wp-content/uploads/2018/09/encalve-main-portrait-e1537861648648.bak.jpg
    And this is the optimized one, used on the site:
    http://YOUR_DOMAIN/wp-content/uploads/2018/09/encalve-main-portrait-e1537861648648.jpg

    Are there any other pixelated images that I could have a look at because rest of them on your Projects page look good to me?

    Also, is there an ETA for the Bulk Image Restore?

    I'm afraid that I don't have any ETA on this as devs are working on complex tasks like this one and they will need to see if the previous script can even be adjusted or new one will be needed.

    Best regards,
    Predrag

    • xman888
      • WPMU DEV Initiate

      Hello Predrag,

      Thank you for your reply.

      I'm afraid that I don't have any ETA on this as devs are working on complex tasks like this one and they will need to see if the previous script can even be adjusted or new one will be needed.

      We assume that you don't have any ETA for the bulk restore script and so you didn't. So we took the time to re-upload the images as our client is not really one of the patient ones.

      But the image before that was pixelated as we tested it among our staff as well as our client and stated that it is really pixelated. It was probably due to the "Super Smash" option being enabled. But disabling it did not restore the images. Even restoring one of the images on the media library did not do the trick. And as previously said, we also tried different methods but none worked. So to resolve this kind of problem, I think the best option is to bulk restore the original copy of the images.

      As for the bulk restore script, we might still need it for future use or if something like this happens again then we have the script already at hand. And not only us but it might help others as well.

      Kind regards

  • Predrag Dubajic
    • Support

    Hi xman888,

    Disabling Bulk Smush will not restore original image on its own, you will need to restore the backup of the image.
    Can you tell me one of the images that I could investigate?
    Could you also upload that same image via FTP to your root WP folder so I could check that and compare it to the backup created by Smush?
    Are you re-uploading your original images or you're uploading .bak images created by Smush?
    Did you make sure that you had backup enabled before doing initial Smushing because if you didn't then the original image will not be saved on your site?

    As for the bulk restore script, we might still need it for future use or if something like this happens again then we have the script already at hand. And not only us but it might help others as well.

    Dev will look into this anyways, and it's actually something being discussed to be added in plugin core.

    Best regards,
    Predrag

  • xman888
    • WPMU DEV Initiate

    Hello Predrag,

    Dev will look into this anyways, and it's actually something being discussed to be added in plugin core.

    That's great to hear! :slight_smile:

    Can you tell me one of the images that I could investigate?

    Pixelated images sample:
    http://YOUR_DOMAIN/wp-content/uploads/2018/09/900-hay-main-portrait-e1536941582317.jpg
    http://YOUR_DOMAIN/wp-content/uploads/2018/09/botanical-apartments-main-landscape.jpg
    http://YOUR_DOMAIN/wp-content/uploads/2018/09/cockburn-main-landscape-e1536942575943.jpg
    ETC...

    Could you also upload that same image via FTP to your root WP folder so I could check that and compare it to the backup created by Smush?

    We have reuploaded the images but now the "Super Smush" is disabled as well as the "Full" image.

    Re-Uploaded image without pixelation sample:
    http://YOUR_DOMAIN/wp-content/uploads/2018/09/900-Hay-Main-v3.jpg
    http://YOUR_DOMAIN/wp-content/uploads/2018/09/Botanical_Apartments_S050_EXT_OutdoorCinema_Final-5000.jpg
    http://YOUR_DOMAIN/wp-content/uploads/2018/09/Cockburn-Main-1.jpg
    ETC...

    Are you re-uploading your original images or you're uploading .bak images created by Smush?

    Our content populator has re-uploaded the images on the website. We did not use the .bak images.

    Did you make sure that you had backup enabled before doing initial Smushing because if you didn't then the original image will not be saved on your site?

    Yep. I was the one who configured the plugin and made sure to enable the backup before I smushed the images.

    Kind regards

  • Predrag Dubajic
    • Support

    Hi xman888,

    Thanks for the additional info, I had a look at the images you mentioned and it seems that there's something besides smush that's affecting your image, meaning that it resizes them which is causing them to be pixelated.
    If you upload original image now with both Super Smush enabled and Full image compression checked you will see that it doesn't loose any quality.

    What happens here is that something is either resizing or slightly zooming in your images which causes them to be pixelated.
    You can see the slight zoom effect if you check images next to each other.
    Image 1:
    http://YOUR_DOMAIN/wp-content/uploads/2018/09/900-hay-main-portrait-e1536941582317.jpg
    http://YOUR_DOMAIN/wp-content/uploads/2018/09/900-Hay-Main-v3.jpg
    Try opening those two images in two separate tabs in your browser, and then switch between them, you will see that the first one is slightly off-centered and zoomed in.
    The same thing can be seen with another image:
    http://YOUR_DOMAIN/wp-content/uploads/2018/09/cockburn-main-landscape-e1536942575943.jpg
    http://YOUR_DOMAIN/wp-content/uploads/2018/09/Cockburn-Main-1.jpg

    Notice that both of these images links have e********* in their name, this suggests that there's something on your site creating specific thumbnail and that one is zoomed in/off-centered and most likely the cause of this issue.
    I would suggest performing a conflict test by disabling your plugins and switching to default WP theme to see what is responsible for creating those thumbnails by adding new images and see if they are properly uploaded after that.

    The last one seems a bit different because it doesn't have e********* part, it's these two images:
    http://YOUR_DOMAIN/wp-content/uploads/2018/09/Botanical_Apartments_S050_EXT_OutdoorCinema_Final-5000.jpg
    http://YOUR_DOMAIN/wp-content/uploads/2018/09/botanical-apartments-main-landscape.jpg

    In here the first image is the original one, and the second one is one in the media library, but if you check these two images you will see that the second one is larger than the original, and if you increase the size of the image it will lose on quality and get pixelated.

    Now, the cause of this issue is probably the same as the previous ones so conflict test should reveal what's causing it.

    Best regards,
    Predrag

  • xman888
    • WPMU DEV Initiate

    Hello,

    Thank you for your reply.

    In regards to the difference, there was because it was our designer who resized and uploaded the images of different sizes. I have confirmed it but the previously uploaded is indeed pixelated.

    For the filenames, it was just the photo editor we are using that is renaming the file images.

    And for the bulk restore functionality, we currently do not have the urgency of using it. But thank you for sharing. We will definitely use this in the future.

    Kind regards

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.