Is There Still a Place for Dianoga on Your Sitecore Website in 2021?

Anton Tishchenko
Anton Tishchenko
Cover Image for Is There Still a Place for Dianoga on Your Sitecore Website in 2021?

Is There Still a Place for Dianoga on Your Sitecore Website in 2021?

Some time ago, I worked with Akamai CDN, which was configured on the top of the Sitecore project. I was impressed by the different features provided on the edge. One of these features was image optimization. Image optimization is a feature that allows you to decrease image size without losing quality. I was able to turn on/off it with one click in the admin console.

Dianoga is an open-source module that is responsible for image optimization in the Sitecore world. But the more and more Sitecore websites use CDN. Let's find out what should be used and when: Dianoga or CDN Image Optimization

Before writing this article, I was under impression that all modern CDNs have image optimization features. But it is not the main and must-have feature. Let's compare the most-popular CDNs to find out, do they provide this feature?

Name Support Image Optimization Links
Cloudflare CDN Yes 1. 2. 3.
Google Cloud CDN No 1.
Amazon CloudFront No 1. 2.
F5 Yes 1.
Fastly Yes 1. 2.
Akamai Yes 1. 2. 3.
Microsoft Azure CDN Yes 1. 2.
Incapsula CND Yes 1. 2.

The comparison showed that almost all CDNs could be configured to provide image compression. But not all of them. Also, almost all of them provide this feature included in pricing plans. You don't need to pay additional money to get it. However, there are other limitations. Not all CDNs support all image formats. And you don't have the flexibility to configure as you want, but for 95% of cases, you would not need it.

Let's back to our initial question:

When do we need to use Dianoga and when CDN image optimization?

Each individual project is different. Before making choice you will need to get more information about image optimization on your CDN: pricing, formats, features, limits, etc. If you are happy with that list then it would be better to configure image optimization on CDN level and forget about it.

But there are still many cases when Dianoga will be a better choice:

  1. Your CDN doesn't have image optimization feature
  2. Your CDN image optimization feature is not free for charge
  3. Your CDN image optimization feature doesn't work with formats that are widely used on your website
  4. You need flexibility in configuration, how images should be optimized
  5. You need not only optimization, but compression as well