• Resolved billiardmama

    (@billiardmama)


    is there a way to replace the original image of one that has already been “scaled”?

    I have MANY images that were auto-scaled by WordPress and I’d like to modify the original file in order to remove the scaled images with proper uploads.

    Currently, when I replace the file using the same name, date, etc. structure it only changes the “scaled” file not the original.

    Is this possible?

Viewing 9 replies - 1 through 9 (of 9 total)
  • Plugin Support Gerard Blanco

    (@sixaxis)

    Hi @billiardmama,

    Yes, of course. Actually, the replace does not depend on the “-scaled” versions. I’m thinking that perhaps you have a cache issue. Could you please check this article and let me know if you have any questions? https://shortpixel.com/knowledge-base/article/158-in-enable-media-replace-the-image-isnt-replaced-why

    Have a nice Sunday!

    Thread Starter billiardmama

    (@billiardmama)

    I appreciate the response but it doesn’t seem to be a cache issue. The issue I am having seems to be related to the media library/image name. Many years ago we uploaded images that were deemed too large by WordPress. We are wiser now with uploads but are trying to replace the images that WordPress compressed on its own those many years ago. These images had a “-scaled” added to the name of the original image. I can access the original image but there is no way to replace that image. The only image we can replace is the scaled version.

    For instance, img_4880.jpg is the image I want to replace with a cropped and compressed version. However, in the media library, this image shows the name img_4880-scaled.jpg. The ORIGINAL img_4880.jpg is there in the uploads folder but there is no opportunity to replace that original image. So I’m stuck replacing the scaled version while the original file still exists. I am having no problem updating images without scaled added.

    IE https://dkbilliards.com/wp-content/uploads/2015/05/IMG_5137-scaled.jpg

    We currently have 5,720 images in our library so any help would be greatly appreciated. Most if not all of the images are attached to years of posts. So to upload new images instead of replacing them seems like something i don’t want to do.

    • This reply was modified 3 years, 11 months ago by billiardmama.
    Plugin Support Gerard Blanco

    (@sixaxis)

    Hi @billiardmama,

    From my side everything is working well. Both the “-scaled” version and the original get replaced.

    I visited the previous link and both images are the same, only that the “-scaled” one is smaller. Which makes me think that there is some strange issue on your site: the “-scaled” version is supposed to be generated only for images bigger than 2560px. However, the “-scaled” you sent is only 1000px.

    Please do the following test:

    1. Deactivate all plugins except Enable Media Replace
    2. Change the theme to a default theme, like Twenty Twenty-Two
    3. Upload an image bigger than 2560px
    4. See the -scaled version generated
    5. Replace it with another image
    6. Send us the link to the -scaled version and the link to the original version

    Thank you,

    Thread Starter billiardmama

    (@billiardmama)

    I replaced the -scaled image with one that is 1000px because I don’t have access to the original non-scaled version in the media library.

    Screenshot:
    https://dkbilliards.com/wp-content/uploads/2022/06/Screen-Shot-2022-06-22-at-10.59.02-AM.png

    https://dkbilliards.com/wp-content/uploads/2022/06/Screen-Shot-2022-06-22-at-11.01.28-AM.png

    https://dkbilliards.com/wp-content/uploads/2022/06/Screen-Shot-2022-06-22-at-11.03.08-AM.png

    https://dkbilliards.com/wp-content/uploads/2022/06/Screen-Shot-2022-06-22-at-11.04.55-AM.png

    https://dkbilliards.com/wp-content/uploads/2022/06/Screen-Shot-2022-06-22-at-11.06.08-AM.png

    I will do your test as a last resort. I should explain that I am not a developer, just an average joe trying to lighten the load of our website. I know enough to get myself into trouble, but not enough to get myself out. Disabling plugins and changing themes is something I know how to do. However, I have messed things up in the past by tinkering with these things. Yes, there is a backup. No, I don’t really want to go through that process of putting things back together if I mess up.

    Thank you so much for taking the time to even look at this issue.

    Plugin Support Gerard Blanco

    (@sixaxis)

    Hi there,

    I think that something was done to your “-scaled” images that unattached them from their original ones.

    When I upload your same image on a test site, and I immediately try to replace, this is what I get. Notice that Enable Media Replace is saying that is going to replace IMG_8740.jpg, even though in the Media Library I see the same as you (IMG_8740-scaled.jpg).

    However, your screenshot shows that it’s going to replace IMG_8740-scaled.jpg. In other words, it looks like IMG_8740-scaled.jpg is an image of its own, not a variation of IMG_8740.jpg.

    That’s why I recommend you doing the test I mentioned before. If you can succesfully replace a new uploaded image, then we will confirm that the problem is actually on the images themselves, and not the plugin.

    Looking forward to your results!

    Thread Starter billiardmama

    (@billiardmama)

    Yes! This: In other words, it looks like IMG_8740-scaled.jpg is an image of its own, not a variation of IMG_8740.jpg.

    I will give the test a shot, but I think you’re right in saying this is absolutely not a plug-in problem. It has everything to do with these old images and how WordPress is handling them.

    You have gone above and beyond with your support and I am truly grateful.

    I’ll keep you updated.

    Thread Starter billiardmama

    (@billiardmama)

    Drumroll please….

    The plugin works fine. Both in our custom child theme and in a default theme (I used 2022 theme) as expected.

    The test went without a hitch. I uploaded the large file. WordPress assigned it a -scaled suffix but when I went to replace the image it replaced the original large image. Upon returning the media library the scaled image was removed and just the replaced file shows.

    Somewhere along the line, in the past 10 years, some of the scaled images in our library are no longer attached to the large parent image. I don’t know why this happened but I suspect it is most likely related to a WordPress white screen of death in 2016 (totally my fault BTW). The site was replaced with a backup a day later but many images were missing and replaced in their original uploads folder. It’s the only explanation I can think of right now.

    It may never be fixed properly. I’ll just have to deal with it. Unless there is a way to use your plugin for an image that doesn’t show in the library. 🙂

    Once again, thanks for helping out. Your plugin and customer service are stellar!

    Plugin Support Gerard Blanco

    (@sixaxis)

    Hi @billiardmama!

    That’s what I suspected. From time to time we see old websites with old data and there’s all sorts of strange issues. Even I personally had some old websites, and found it easier to simply upload the same image again and not deal with old information.

    I’m sorry we weren’t able to determine what happened with your website, but at the same time I’m glad we were able to, at least, rule out something!

    Have a nice Sunday!

    Thread Starter billiardmama

    (@billiardmama)

    I’d like to share a tiny update for anyone that may have the same issue with original images not appearing in the library. I found a plugin that was able to attach the non-scaled version to the gallery. Upon testing (after backing up of course), I was able to select the image from the uploads folder and force add it to the WordPress media library using the plugin. It worked, sort of. The previously hidden image appeared in the library as a duplicate. Both media files have the same name and both have -scaled in the name shown in the list view. BUT, one of the files has a link to the original unscaled version and is not attached to a post. The file with the link was able to be rewritten by the Enable Media Replace plugin for the ORIGINAL image. Once that happened, the new file had to be manually attached to the post.

    It is a workaround, however probably not the most practical with as many files as we have to change. The plugin I used to attach the “hidden” images is called Media Sync.

    Big thanks to Enable Media Replace for helping troubleshoot our issue.

Viewing 9 replies - 1 through 9 (of 9 total)

The topic ‘replace original image’ is closed to new replies.