How to get cache images path
-
14-04-2021 - |
Pregunta
I am showing Listrak on site recommend product on my website.
Product images are very big, I need resizes images.
I have images name like 2/0/20mm.jpg
and I am appeding it with https://example.com/media/catalog/product
So it will be
But i want
https://example.com/media/catalog/product/cache/fc6ca0131474e1299ecedb80f5002264/2/0/20mm.jpg
Note: I do not have product object, So can't load an get resized images that why need to get cache folder path so I will append image name.
Thanks in advance!
Solución
You can hard code the hash as it depends only on the image target format and mostly does not change.
Licenciado bajo: CC-BY-SA con atribución
No afiliado a magento.stackexchange