cancel
Showing results for 
Search instead for 
Did you mean: 

Uploading same or different image but with same file name does not show/change at frontend

SOLVED

Uploading same or different image but with same file name does not show/change at frontend

Apologies in advance if it is a newbie question or daft.

 

The issue am having is as follows:

 

When uploading an image via FTP or in the backend of Magento 2, for example in CMS blocks, Wysiwyg etc. with the same name and it already exists and it is overwritten, it does not show at frontend but instead, the overwritten/previous image is always shown when I check at frontend.

The location of the folder does not make a difference as it does not accept the image if the image with the same name already exists even if it is overwritten. I can see the size changing with the date etc of the newly uploaded image with the same file name but it simply will not display at frontend.

 

It works fine for new uploaded images and ones which obviously do not exist.

 

If I change the name of the image before uploading then it will show at frontend, if I upload a different image with the same name then it will only show the previous image.

 

Deploying static content etc. does not work as a solution, unfortunately.

 

It is not a serious issue to change the file names of the image before uploading but the problem now is that I have to upload images for flags at frontend and have by mistake uploaded the UK flag for United States and I have no idea how to have it display the newly uploaded image.

Any advice and guidance on troubleshooting this is truly appreciated or from anyone who had a similar problem and found a solution.

 

Thank you.

1 ACCEPTED SOLUTION

Accepted Solutions

Re: Uploading same or different image but with same file name does not show/change at frontend

Hi @m2newbie,

 

Probably the main issue is that Magento creates a cached copy of the file.

Did you tried refreshing the Magento's cache?

 

Selección_001.png

 

 

 

View solution in original post

3 REPLIES 3

Re: Uploading same or different image but with same file name does not show/change at frontend

Hi @m2newbie,

 

Probably the main issue is that Magento creates a cached copy of the file.

Did you tried refreshing the Magento's cache?

 

Selección_001.png

 

 

 

Re: Uploading same or different image but with same file name does not show/change at frontend

Hi @Damian Culotta

 

Thanks so much for replying.

 

I actually have not try that as of yet after uploading images.

 

I will do so tomorrow and report back but a couple of questions regarding this:

 

a) Do I have to do this every time I upload one image or more?

b) Is the process you described above, still required even if all cache is turned off in backend of Magento 2? System ---> Tools ---> Cache Management ---> All cache is turned off

 

Thanks in advance.

Re: Uploading same or different image but with same file name does not show/change at frontend

Hi @Damian Culotta

 

I tested this just now and it worked but had to clear the browser cache too to see the image as well otherwise it would not work.

 

Thanks for this and sorry if it was a newbie question and very simple.

 

Thanks for the solution though very simple as it helped me.