Try our conversational search powered by Generative AI!

EPiServer and ImageResizer in Azure

Vote:
 

Hello

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?

/Peter

#178848
May 24, 2017 10:28
Vote:
 

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: https://imageresizing.net/docs/v4/plugins/azurereader2

#178862
May 24, 2017 15:53
Vote:
 

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?

/Peter

#178863
May 24, 2017 16:07
Vote:
 

Gotcha.

With https://github.com/bjuris/EPiServer.CdnSupport you can rewrite (only) all media URLs to an absolute "CDN" or other proxy type URL.

#178864
May 24, 2017 16:10
Vote:
 

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

/Peter

#178908
May 26, 2017 8:09
Vote:
 

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.

#178909
May 26, 2017 8:55
Vote:
 

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

#179071
May 30, 2017 21:46
Vote:
 

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

/Peter

#179091
May 31, 2017 8:07
Vote:
 

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

#179093
May 31, 2017 8:29
Vote:
 

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.

#179094
May 31, 2017 8:39
Vote:
 

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.

#205535
Jul 16, 2019 4:43
Vote:
 
  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. 
#205736
Jul 22, 2019 22:31
Vote:
 

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.

#205854
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.