Try our conversational search powered by Generative AI!

Using CDN with EPiServer


I am helping a client is already using EPiSever deployed on Windows Server in Azure Virtual machine. It is using SQL Server backend.

They have a lot of images. They currently don't use any CDN. They will benefit from using a CDN.

In the past I have used CDN when the media was stored in the blob storage. 

However in this case they don't even use Azure blob storage.

Can they take advantage of CDN even when the content is not in blob storage?

Azure CDN now allows custom origin so we can point it to any HTTP URL and it picks up media from it.

Has anybody implemented such a setup before?

Other issue has to do with update the URL so the content is retreived from CDN end point.

I have seen posts in this forum where code samples to implement such an URL rewriting was implemented.

I was wondering if EPiServer has a code sample or guidance.

Sep 11, 2015 23:18

Good question! Does anyone know?


Sep 16, 2015 13:57

Have not tried but it but for code examples with using CDN, check out this:

Sep 16, 2015 14:18

Hi Henrik, 

Thanks for your reply. I've seen this as well, but that still requires the editor to upload directly to Azure.


Edited, Sep 16, 2015 14:39

Using the above referenced module, you could achieve a "poor man's cdn", by having images delivered from the same server but with a different hostname(s) - e.g. This would allow for better parallelization and also you could make it a cookie free domain to shave off request lengths.

I would also recommend you to take a look at ImageResizer which is quite competent at overcoming the issues with serving directly from blobs. Combine this with poor man's cdn and you'll have a quite powerful solution at virtually no cost.

Sep 21, 2015 0:22

We have successfully used as a simple way to move images to a CDN.

With CloudImage you can resize images as well, but in your case you could just move the images to CDN.

Edited, Sep 22, 2015 9:59


Sep 22, 2015 14:20
Sep 24, 2015 15:27

I am having trouble understanding a few things about the comments above.

Why  Johan used the term "poor man's cdn"? Why is it a poor man's CDN?

Several others used the phrase "moving images to CDN".

Most CDN's automatically move the images from origin.

As an example if you store images in Azure blob storage and enable CDN. Yoiu will get a URL for CDN.

In the website code if you use the CDN URL Azure CDN will automatically move the images from Azure blob storage and cache them in

CDN Point of pressance(POP) until the cache header set by the user expires.


Sep 24, 2015 16:06

Re: poor man's CDN - It is poor because it's no real CDN, it just uses a similar approach. It does not benefit from having separate servers, nor does it use geo load balancing.

Re: moving images to CDN - Correct me if I'm wrong but in case you don't host the site in Azure you will have to do some magic to transfer the files to CDN. cloudimage as mentioned above seem to solve this in a very convenient manner.

Sep 25, 2015 8:49

Since my question was about hosting in Azure I will assume that I will not be manually moving images and my CDN will not be poor man's CDN.


Sep 30, 2015 4:34
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.