Try our conversational search powered by Generative AI!

EPiServer and ImageResizer in Azure



We are looking into adding ImageResizer to one of our sites running in Azure(not DXC).
Simply just adding ImageResizer is no problem. Our questions are about caching.

  • Do the DiskCache plugin work in azure, even when the site runs in multiple instances?
  • Is the DiskCache plugin enough to have acceptable performance?
  • Or is a CDN required to have ok performance? If so, is it possible to only have EPiServer assets¬†routed to the CDN?


May 24, 2017 10:28

I wouldn't cache on disk since I think it would eat resources that otherwise would be used for other application caching.

For the same reason it's not smart to log to disk in Azure.

Haven't used ImageResizer but I see there's a blob storage plugin available:

May 24, 2017 15:53

The files are read from blobstorage before being transformed. I think the recommended way of using imageresizer in azure is diskcache and a CDN.

I would like to skip the CDN if possible, or only use the CDN for episerver media and not the entire site. Is that even possible?


May 24, 2017 16:07


With you can rewrite (only) all media URLs to an absolute "CDN" or other proxy type URL.

May 24, 2017 16:10

So using only DiskCache in Azure is not going to give acceptable performace?


May 26, 2017 8:09

It's not recommended to use and fill up disk in an Azure Web App for any use case so I wouldn't take that road.

May 26, 2017 8:55

I haven't had any problems using only DiskCache in an Azure web app. That was however a quite small, low traffic site.

May 30, 2017 21:46

Ok, do you have DiskCache autoClean enabled when running in Azure?


May 31, 2017 8:07

I'm pretty sure that it wasn't enabled. Not even sure it was available at that time (approx. two years ago).

May 31, 2017 8:29

We have used ImageResizer in Azure quite a few times, also for quite big sites. I haven't noticed any performance problems using the DiskCache plugin.

May 31, 2017 8:39

Disk cache plugin is quite problematic on Azure when you have too many images and your site is under heavy load. I have experienced the site running out of disk space (even with a CDN sitting in front of it). We have an Azure site with 50 GB storage, but the disk filled up in less than two days. After that we have to disable the disk cache plugin, and rely solely on the CDN to cache the images.

The CDN is the absolutely must have thing, because Image resizing operation eats up a large chunk of CPU time and memory. You'll bring your web server to its knee without the CDN.

Jul 16, 2019 4:43
  1. Get CDN. Rewrite your image urls is fastest way to support it. Use unique urls with a hash. There is a nuget package for it. 
  2. Use Image Resizer as usual but without disc cache. 
Jul 22, 2019 22:31

The Picture helper renders a picture element. The picture element presents a smorgasbord of images in different sizes and formats. It’s then up to the browser to select the most appropriate image depending on screen resolution, viewport width, network speed, and the rules that you set up.

Jul 25, 2019 12:04
* 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.