cancel
Showing results for 
Search instead for 
Did you mean: 

Wrong image cache path in store view

SOLVED

Wrong image cache path in store view

Hello, 

I have a strange problem with all product images. All images are displayed correctly in the main store view.
In the second store view the images are not loaded correctly because the wrong cache folder is selected.

Store View DE:
/pub/media/catalog/product/cache/152cdd159415837a0ba008b76d636ddb/m/o/moldmax-10_1.jpg

Store View EN:
/pub/media/catalog/product/cache/4c536e1ae404cb47efd09f5d80cfe65b/m/o/moldmax-10_1.jpg

Does anyone have any idea what could be the cause?

 

Cache has already been cleared.

view.xml in custom theme was set and tried deleting it as well.
I also tried several times catalog:resize:image with no effect

 

If I look directly in the media folder, the cache folder of the store view EN is missing.

All images are correctly assigned in the backend.

 

Maybe someone knows where the hash is created, then you could switch off the distinction of the store views.

 

Thanks and best, 
Rudi

1 ACCEPTED SOLUTION

Accepted Solutions

Re: Wrong image cache path in store view

It seems also being resolved in 2.3.4 which was released today.

View solution in original post

7 REPLIES 7

Re: Wrong image cache path in store view

HI @rudolf_uivari 

Make sure that you have ".htaccess" file in the pub/media folder.

It might be issue.

Re: Wrong image cache path in store view

Hi Vimal, 

 

thanks for your respond. Yes the .htaccess is there, I tried it without and then all the images are gone, so I could rule that out.


Re: Wrong image cache path in store view

For me it sounds like you got stuck at the same point like me. It's a magento 2 issue and only workarounds are present. No real solution - at least nothing was working for me.

 

Are you still dealing with it?

 

https://github.com/magento/magento2/issues/19710

 

https://community.magento.com/t5/Magento-2-x-Technical-Issues/Images-not-shown-wrong-hash-in-url/m-p...

Re: Wrong image cache path in store view

I solved it now. 

 

The solution was posted here today: https://github.com/magento/magento2/issues/19710

 

copy/pasted:

[MDVA-24153_EE_2.3.3_v1.composer.txt] (https://github.com/magento/magento2/files/4122826/MDVA-24153_EE_2.3.3_v1.composer.txt)
Rename the file from .txt to .patch

patch -p1 < FILE_NAME.patch

(If the above command does not work, then try using -p2 in place of the -p1)

The commit for the patch can be found below

f4c293d#diff-f4ccc4f170b7314a8b6a1aac32190d47

 

---------------------------------------------------------

1. php bin/magento deploy:mode:set developer

2. patch -p1 < FILE_NAME.patch

3. php bin/magento setup:upgrade

Re: Wrong image cache path in store view

It seems also being resolved in 2.3.4 which was released today.

Re: Wrong image cache path in store view

Thanks a thousand times, tried your solution and it worked immediately and after the update as well Smiley Wink

Re: Wrong image cache path in store view

Hi try this Setting.

Admin panel > Stores > Settings > Configuration > GENERAL > Web > Url Options > Catalog media URL format 

this setting is working on my website.