Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
Has anyone come accross issues when using the azure blob cache and image processor
The following config fails to load any image crops, however if I rename the container from "websitename-media" to "media" and update the config to match the crops load fine.
Because I have several sites in the same account it is not possible to call all of the containers "media"
<?xml version="1.0" encoding="utf-8"?>
<cache name="AzureBlobCache" type="ImageProcessor.Web.Plugins.AzureBlobCache.AzureBlobCache, ImageProcessor.Web.Plugins.AzureBlobCache" maxDays="365">
<setting key="CachedStorageAccount" value="DefaultEndpointsProtocol=XXX" />
<setting key="CachedBlobContainer" value="websitename-cache" />
<setting key="UseCachedContainerInUrl" value="true" />
<setting key="CachedCDNRoot" value="https://xxx.blob.core.windows.net" />
<setting key="CachedCDNTimeout" value="1000" />
<setting key="SourceStorageAccount" value="DefaultEndpointsProtocol=XXX" />
<setting key="SourceBlobContainer" value="websitename-media" />
<setting key="StreamCachedImage" value="false" />
I've narrowed it down a little
In the security config if I change just the host to :
<setting key="Host" value="https:/website/media/"/>
rather than :
<setting key="Host" value="https:/website/website-media/"/>
everything works as it should as long as there is a duplicate container called "media"
Not sure what this means unfortunately
Is the container name for your AzureBlobFileSystem provider in filesystemproviders.config set to "websitename-media"?
It is yes.
I think I've found the issue but don't think its easily resolvable.
it seems to be a conflict with
<add key="useDefaultRoute" value="true" />'
if this is set to false, and you attempt to access the media via the blob containers name the cache works fine eg
Setting this it to true works as long as your not using imageprocessor functionality, as soon as you need to it breaks it completely for any cache type, ironically only if you are not using 'media' as the container name.
Anyone know if this an umbraco issue or blobcache plugin one?
We use custom media container names in our azure file blob storage provider and useDefaultRoute set to true. But we do not use the blob cache so I would probably start by looking at the blobcache.
Can you update your cache to use the diskCache temporally to see if that's what's causing the issue?
I can't see a config for the CloudImageService in your question so it's pretty much guesswork from here.
First things first, Let's have a look at your AzureBlobCache directory.
<cache name="AzureBlobCache" type="ImageProcessor.Web.Plugins.AzureBlobCache.AzureBlobCache, ImageProcessor.Web.Plugins.AzureBlobCache"
maxDays="365" browserMaxDays="7" folderDepth="6" trimCache="true">
<setting key="CachedStorageAccount" value="DefaultEndpointsProtocol=https;AccountName=[CacheAccountName];AccountKey=[CacheAccountKey]"/>
<setting key="CachedBlobContainer" value="websitename-cache"/>
<setting key="UseCachedContainerInUrl" value="true"/>
<setting key="CachedCDNRoot" value="[CdnRootUrl]"/>
<setting key="CachedCDNTimeout" value="1000"/>
<setting key="SourceStorageAccount" value="DefaultEndpointsProtocol=https;AccountName=[SourceAccountName];AccountKey=[SourceAccountKey]"/>
<setting key="SourceBlobContainer" value="websitename-media"/>
<setting key="StreamCachedImage" value="false"/>
SourceStorageAccount and SourceBlobContainer add overhead to the process since they check the source image to determine whether it has changed from when the image was originally uploaded. If you don't need this, don't bother with it.
Looking at the CachedCDNRoot you're not setting the CDN url, only the blob one.
Now. Back to the question....
I think I see where your confusion is lying.
Three things you need to understand:
So with that in mind, let's have a look at the following request.
This works with the useDefaultRoute setting set to false because the the source image is physically located within the website-media folder. and the path generated by Umbraco uses the relative path /website-media .
With the useDefaultRoute setting set to true, while the source image is physically located within the website-media folder, the path generated by Umbraco uses the relative path /media .
As such, no IImageServices know where to look for the source image!
I'm assuming your CloudImageService is set up to look something like this:
<service prefix="websitename-media/" name="CloudImageService" type="ImageProcessor.Web.Services.CloudImageService, ImageProcessor.Web">
<setting key="MaxBytes" value="8194304"/>
<setting key="Timeout" value="30000"/>
<setting key="Host" value="http://[myAccountName].blob.core.windows.net/websitename-media/"/>
The key to letting ImageProcessor.Web know how to get the image would be to set the prefix value to the following. prefix="media/"
That way it still requests the correct blob but can recognise the url generated by Umbraco.
Does all that make sense?
Thanks for your explanation - makes it does make sense and essentially all I was missing was the prefix as you suggested!
Thanks for your help with this!
Very happy I was able to help, any other issues don't hesitate to ask.
I have a problem with azure cdn + umbraco that you maybe can help.
I have 2 projects one umbraco 7.15.3 and the second is umbraco 8.6.1
both configured to work with azure storage and cdn (every project with its own storage)
both are working fine except for one problem with the umbraco 8
the flow is like this:
i upload an image from the umbraco backoffice media section.
i can see the image in the right folder in azure storage and i can see the thumbnail in umbraco media section
but when i click the image i can see the properties of it but no image :(
i made number of test and realized that when i use the imageprocessor the image is served with no problem (that is the reason that i can see the thumbnail in umbraco backoffice, the url is http://localhost:6365/media/53lfufg3/call.png?width=500&mode=max&animationprocessmode=first it uses the imageprocessor and everything is working)
but when I request the image like http://localhost:6365/media/53lfufg3/call.png
i get nothing
please help if you think of anything that can cause this behavior
is working on a reply...
Write your reply to:
Image will be uploaded when post is submitted