I can see how to set add CDN to my Azure storage, but I assume that some settings in Umbraco should also be configured. Can anyone share their insights?
@Jeavon Leopold, thank you. I looked at this. I took the following steps:
I created a storage account in azure (was not too sure about security settings under networking tab or configuration tab, i.e. allow blob public access)
Under the Azure CDN tab in the storage account I created an endpoint (under the endpoint tab) with origin pointing to the blob storage.
Under the caching tab in the cdn, I choose cache every unique url.
Followed the documentation from the link above, and moved all files to media folder in storage container.
But I think you have already put the code in the correct place, if your site works & media is in Azure.
Your "I created an endpoint (under the endpoint tab) with origin pointing to the blob storage" remark sounds like it could be incompatible with croppings. We always set our CDN endpoints to pull media from Umbraco,
Thanks. How do you set the CDN endpoints to pull media from umbraco (the steps to create the cdn endpoint when storage container for media is already created)? I think you're right. I just tested the live image cropper to reposition the focal point and it is not moving images. I imagine this is related to the imageprocesser errors in the logs (hundreds) (could be related).
The focal-point feature is not automatic IIRC, I think you have to do something in the views to enable it. This is probably unrelated to Azure Storage.
I followed the blob storage guide from Umbraco here. I am not using azure blob cache, perhaps that is the issue? I set up a blob storage in azure, then a container called media. everything is storing correctly, but I am getting image processor errors in the logs. Only the localhost, changing the focal point of an image used to work. Now it does not. I imagine it is related somehow.
I want to also create a CDN endpoint for faster response, but it sounds like it is not required.
Azure Blob storage and Azure CDN
I have set up Umbraco to serve media (and cached media e.g. image crops) from Azure Blob storage.
Is this enough? Or should I also use Azure CDN?
I can see how to set add CDN to my Azure storage, but I assume that some settings in Umbraco should also be configured. Can anyone share their insights?
Here is my summary from a discussion on this topic on Slack:
Unless you are serving numerous (or very large) files, the CDN is not really worth doing.
Just by using blob storage for media and cache (e.g. crops) you have managed to centralise the media (i.e. it is no longer held locally).
The webapp will be a constraining factor (as any request for /media/ is first handled there).
One argument for using a CDN is that it is more likely to support HTTP/2 - but that is well outside my current use case.
Isn't it possible to just have the front-end emit media links to https://site.blob.azure.com/media/ instead of https://site/media/ to mitigate this?
That's how a CDN endpoint against the BLOb Storage Container would have to work anyway, with links to https://cdn.site.azure.com/media/, right?
That sounds reasonable... but you probably want it to run through the webapp to generate any missing (previously unrequested) crops.
(I think that's how it works... I'm still a relative noob in the Umbracoverse.)
Could someone please share how to link blob storage to an Azure CDN and the changes needed regarding the CDN, if any, in umbraco?
and
Have a look at https://our.umbraco.com/forum/using-umbraco-and-getting-started/108466-imageprocessor-imagesharp-not-working-with-azure-blobstorage-through-cdn
I am still a bit lost in regard to the configuration. I followed the umbraco documentation (https://our.umbraco.com/Documentation/Extending/FileSystemProviders/Azure-Blob-Storage/index-v8) and the site works, but I am not 100% certain it is configured properly.
@Per Bolmstedt, where does that code go?
@Jeavon Leopold, thank you. I looked at this. I took the following steps:
I created a storage account in azure (was not too sure about security settings under networking tab or configuration tab, i.e. allow blob public access)
Under the Azure CDN tab in the storage account I created an endpoint (under the endpoint tab) with origin pointing to the blob storage.
Under the caching tab in the cdn, I choose cache every unique url.
Followed the documentation from the link above, and moved all files to media folder in storage container.
Site works, but I am unsure if any further settings are needed. I do not see the cache folder in the storage and the back office log shows a lot of image processing errors as shown https://our.umbraco.com/forum/using-umbraco-and-getting-started/104074-image-processor-error.
Any ideas why the error or is the configuration incorrect?
https://our.umbraco.com/forum/using-umbraco-and-getting-started/102205-azure-blob-storage-and-azure-cdn#comment-337976 and https://our.umbraco.com/Documentation/Extending/FileSystemProviders/Azure-Blob-Storage/shows where the code goes. :)
But I think you have already put the code in the correct place, if your site works & media is in Azure.
Your "I created an endpoint (under the endpoint tab) with origin pointing to the blob storage" remark sounds like it could be incompatible with croppings. We always set our CDN endpoints to pull media from Umbraco,
Thanks. How do you set the CDN endpoints to pull media from umbraco (the steps to create the cdn endpoint when storage container for media is already created)? I think you're right. I just tested the live image cropper to reposition the focal point and it is not moving images. I imagine this is related to the imageprocesser errors in the logs (hundreds) (could be related).
The focal-point feature is not automatic IIRC, I think you have to do something in the views to enable it. This is probably unrelated to Azure Storage.
The CDN endpoint has
https://umbraco-site/media
as its source/upstream.Any emitted URL will be on the form
https://cdn/umbraco-media-id/media.jpeg?crop=x&focus=y&format=z
and the CDN endpoint will then fetch the media from Umbraco "as usual".Umbraco doesn't know it is the CDN endpoint requesting the cropped/focused/etc. media.
From a base installation, I think you only need to add the storage/CDN configuration and the Startup code.
I'd start with verifying that the configuration is correct; IIRC the Azure Storage feature in Umbraco is disabled if it isn't.
I followed the blob storage guide from Umbraco here. I am not using azure blob cache, perhaps that is the issue? I set up a blob storage in azure, then a container called media. everything is storing correctly, but I am getting image processor errors in the logs. Only the localhost, changing the focal point of an image used to work. Now it does not. I imagine it is related somehow.
I want to also create a CDN endpoint for faster response, but it sounds like it is not required.
is working on a reply...