-
i have to call an ajax request from an external website which (the
simple way) returns the link to an product image of a store view i
added to the request. The problem is, that the following function
call always returns the path from the default store view, cause the
request is to the default store.$this->helper('catalog/image') ->init($product, 'image') ->keepFrame(false) ->resize(250);
- If the calling site is a https site, the website can't show the image, because it's loaded from a non https site.
So there are two questions:
- How can i load an image path of a specific store view id?
- How can i load the image path with the secure base url?
Thanks in advance for any help!
Best Answer
The quick and dirty way is to strip the protocol designator and turn it into a Protocol Relative URL: