Hi Andrei, Thanks for responding to my question. I'm using relative paths in my solution like so:
var sampleImagesPath = CommonHelper.MapPath("~/content/myfolder/");
product.ProductPictures.Add(new ProductPicture
{
Picture = _pictureService.InsertPicture(System.IO.File.ReadAllBytes(sampleImagesPath + "icon.jpg"),
MimeTypes.ImageJpeg, _pictureService.GetPictureSeName(product.Name)),
DisplayOrder = 1,
});
On my local environment, I'm testing on localhost http://localhost:15536. Locally since everything is http, images are rendered withought any warnings. However when I push my changes to my testing environment on a remote server with a url similar to this: https://test.dev.mystore.com/ All images though rendered correctly generate a Mixed Content SSL warning on the console. It looks as if images always render as http, regardless of the current https url. I ended up temporarily having to change _webHelper.GetStoreLocation(); on the PictureService to _webHelper.GetStoreLocation(true); Prior to this I also tried on Configuration->Stores settings, selecting the SSL enabled option but this just crashed the whole page. I tried several combinations:
- SSL enabled and Secure URL blank (crashed)
- SSL enabled and Secure URL with a value (crashed)
- SSL disabled and Store URL containing a https secure URL (had no effect and warnings were still occurring)
Could this be related to the cache logic some other posts on the feed were referring to?
Thanks in advance!
Kind regards,
Clara