I've tried tracking this down and the image is added to the database via /Admin/Picture/AsyncUpload which returns something like
{"success":true,"pictureId":3035,"imageUrl":"https://myblobstorage.blob.core.windows.net/sitestorage/0003035_100.jpeg"}
And actually adds the file
0003035_100.jpegto Azure storage.
When clicking the Save button it then posts to the admin action
ProductController.ProductPictureAdd.
The picture is being associated in the Product_Picture_Mapping table correctly.
I then click the add product picture and the image in azure storage is rename to
0003035_{seo_name}.jpeg
When PictureService.GetPictureUrl is called is tries to load the binary:
string url = string.Empty;
byte[] pictureBinary = null;
if (picture != null)
pictureBinary = LoadPictureBinary(picture);
if (picture == null || pictureBinary == null || pictureBinary.Length == 0)
{
if (showDefaultPicture)
{
url = GetDefaultPictureUrl(targetSize, defaultPictureType, storeLocation);
}
return url;
}
Now, because AzurePictureService doesn't override LoadPictureBinary and the images are never placed on ~/content/images on the AppService, this always returns the default image url for images uploaded to azure after an application restart (I'm not sure why it works before application restart, I'm assuming the url is cached.)