• Hi there,
    I upload an image, that’s okay but when I want to replace that file with the same name, I delete the previous one, and upload the different image with the same name.

    That could have done the work but it didn’t. The image still shows the previous one on the frontend, backend in media library and posts and pages and everywhere, if I clear my browser cache or try in a different browser, its the previous image.

    But, if I go to see the image in my hosting backend, there it is the new one and I can see it.

    I even used the enable media replace plugin to replace the images, it did work previously and it did work this time too but as I said the new image only showed in the hosting backend this time.

    The problem is finally resolved if I change the name of the image to something else and upload it. This shouldn’t be like this.

    What do I do?

    And yeah, I don’t have any caching plugin on my site.

Viewing 15 replies - 1 through 15 (of 16 total)
  • Moderator Steven Stern (sterndata)

    (@sterndata)

    Volunteer Forum Moderator

    Are you using the Jetpack CDN (formerly called “photon”)? If so, disable it as it will not replace cached images if the image is replaced by another file of the same name.

    Thread Starter Sujal Jain

    (@sujaljain007)

    I forgot to tell, when I enabled varnish cache on my hosting backend, after enabling that, the issue had emerged (maybe) but as soon as I disabled varnish, the issue was gone for about 2 minutes and then reappeared again.

    I am not using any plugins except for code snippets (no snippets activated except for add_filter( 'jpeg_quality', create_function( '', 'return 100;' ) );), enable media replace by shortpixel, kadence blocks, and stop generating unnecessary thumbnails.

    I hope you may be able to help me. Looking for your response.

    Thread Starter Sujal Jain

    (@sujaljain007)

    Okay, after further investigation, I got to see that if I delete the image, then, it showed me the image on my mobile, desktop, and everywhere even if I switch to mobile data from wifi, that shouldn’t happen. But, if I check the image URL in proxysite.site, it does show a 404 error.

    And, if I enable VPN to another location, then the image does show a 404 error for the first time. Then I thought the issue could be with the database of WordPress because the image was deleted successfully from the server.

    Now, to test further, I uploaded an image with the name unnamed.png. Then, I deleted that image and uploaded a different image with the same name i.e., unnamed.png. The result was not successful anywhere.

    The old image showed even on VPN, mobile, and guest window on chrome, incognito, VPN on mobile, and anywhere.

    I don’t have caching enabled on my WordPress with any of the plugins and also I didn’t enable varnish again.

    Do database caching i.e., maybe Memcached affects this? I think my hosting has this enabled already by default.

    Looking for your response in need. Please help, the new image only shows up if I change the name. That’s not a good option for me.

    It is so confusing. What do I do?

    Thread Starter Sujal Jain

    (@sujaljain007)

    Okay, after further more investigation, I found out that if my site is site.com and I upload an image with the name “site.png” or “site-logo.png” or “site-fav.png” anything with the name of my site included, the attachment page permalink is unnormal.

    The attachment URL for these images just are like site.com/site for site.png, site.com/site-logo for site-logo.png, and site.com/site-fav for site-fav.png

    All other images are just fine I think with the URL structure: site.com/?attachment_id=80

    Also, the new image did show after 10-20 minutes for the first time in the incognito window only and then again showed the old image. What is going on?

    I am so so so so much confused dude. Please you gotta help me out here. I don’t know where to go and what to do?
    This issue did happen to me earlier on another site but that didn’t affect for long much I think so. I don’t know what I did earlier. Maybe, I think I didn’t do much just changed the name so as to resolve the issue, I didn’t have time those days to resolve the issue, I suppose.

    Thread Starter Sujal Jain

    (@sujaljain007)

    After further further more investigation, the issue has gone on my nerves. If I go see the deleted image with my mobile data or wifi without vpn, the deleted image shows up on mobile or pc too. And, if I enable vpn, it shows 404.

    And, interestingly, the new image did show after 15-20 minutes, on frontend but it didn’t show the new image in backend I mean in media library.

    So, now I think you may be able to help me. I have given any little piece of as much information as I can gather.

    Moderator Steven Stern (sterndata)

    (@sterndata)

    Volunteer Forum Moderator

    You did not answer my question. Are you using Jetpack?

    Please provide a link to a page on your site where we can see this. Thanks. Note: Your link will be public and we will not later remove it.

    Thread Starter Sujal Jain

    (@sujaljain007)

    No, I don’t use jetpack. I think I answered your question already. Okay.

    I just realized that the issue is resolved only if I change my IP.

    Here, I mean that until and unless I change my IP or use VPN, the old image and deleted one both show up on all of my devices with the same wifi (means the same IP).

    As soon as I use a VPN (changed IP), all is back to normal.

    So, I request you to help me with this. Is this an issue regarding my hosting or cache or my ISP or WordPress?

    What is it?

    Moderator Steven Stern (sterndata)

    (@sterndata)

    Volunteer Forum Moderator

    I suspect it has to do with caching someplace above (below?) WordPress and before your browser, as the server serves the right images if the IP changes. So, let’s start with seeing if it’s an interaction with WP and your host/cache/etc.

    This may be a plugin or theme conflict. Please attempt to disable all plugins, and use one of the default (Twenty*) themes. If the problem goes away, enable them one by one to identify the source of your troubles.

    Thread Starter Sujal Jain

    (@sujaljain007)

    Hi there, yeah I recently enabled troubleshooting mode which always enables the default theme and deactivates all the plugins. Then, the problem still persists.

    And, about the issue, I again remind that the new image surely can be seen in the hosting.

    Thread Starter Sujal Jain

    (@sujaljain007)

    Okay, now it is getting worse again, I thought changing IP resolves the issue (it did). Now, it is not resolving even after enabling the VPN.

    Can you check my site:blogish.me

    EDIT: Do I reinstall WordPress, more issues are emerging like I updated the theme, it reverted back to the previous version and asked for an update again.

    • This reply was modified 3 years, 5 months ago by Sujal Jain. Reason: reinstall wordpress
    Moderator Steven Stern (sterndata)

    (@sterndata)

    Volunteer Forum Moderator

    Have you tried disabling cloudflare? Back down to as “clean” a setup as possible. No cache, no optimization plugins, no CDN.

    Thread Starter Sujal Jain

    (@sujaljain007)

    Now, pausing site on Cloudflare, it is already 15 minutes. The new image is still visible on the frontend but in the backend at the media library, the old image is still shown.

    Moderator Steven Stern (sterndata)

    (@sterndata)

    Volunteer Forum Moderator

    So, let’s assume that *something* gets very confused when you replace a file with another of the same name…. How about just uploading a new image and letting WP do its normal “add a ‘-x’ ” number to it?

    Thread Starter Sujal Jain

    (@sujaljain007)

    Yeah, it always works what you said above. But, I can’t do that.

    I am now going pretty straightforward after researching, I have come to a conclusion.

    Everything shows perfect if I access them in proxysite.site

    I mean the deleted image is really deleted in proxysite.site and the new image is new in proxysite.site

    What is the issue? I also encountered the same issue in my test blank site. I now re-enabled Cloudflare because that never caused the issue.

    I am now testing the same issue with some other host, so as to check if this is related with my host rather than anything else.

    Thread Starter Sujal Jain

    (@sujaljain007)

    Okay, I tested the issue with other host and found out that new image shows there, no problem with that but if I delete the image, it still shows the deleted image everywhere but no proxysite.site

    I even flushed my computer cache, opened in vpn, no effect. But proxysite.site helps.

    Now, you are the only one who can help me without abandoning the issue.

Viewing 15 replies - 1 through 15 (of 16 total)
  • The topic ‘Image won’t update anywhere’ is closed to new replies.