Help
Image Optimisation Module

One of the biggest impacts on a sites performance, especially mobile is the volume of image data being pulled down. It is easy for most content authors to understand and adjust a 2000 pixel wide image to reduce the image's file size but its another step and often a software tool to achieve the best optimisations.

Image
Optimisation

The image optimisation module intercepts image uploads and before saving the file to Sitefinity storage, it runs it through an optimisation process to help reduce image size.

The module copies the code sample from Sitefinity that uses Kraken.io for the same purpose but replaces the Kraken paid cloud service with a free image manipulation library called ImageMagick. The module also provides the original code for Kraken by Yasen Yankov for your convenience allowing you to choose which one to use but it adds no further functionality or improvements.

Requirements

If you plan to use Kraken you will need to have signed up and have your API keys.

Installation

Install the NuGet package to your Sitefinity web application. Add the module's license to the /App_Data/Sitefinity/ folder.

Configuration

Go to the advanced settings and the PdrImageOptimisation node. You have the two options with Kraken taking priority if both are selected.

Image Optimisation config

There are two options which you can adjust with the recommendation set as the default.

Image Magick configuration

The optimisation will happen whenever an image is added to Sitefinity or you adjust an image's dimensions. But not if you change its metadata such as title or alternative text fields.

Good To Know

One thing your users will still need to do themselves is to adjust the dimensions of the image. If a 3MB, 2000 pixel wide image is uploaded then the image will optimise it as a 2000 pixel wide image. If you only need 500-pixel wide image then the file size will be much greater reduced by resizing it down first and then uploading.

When uploaded the process will:
Adjust the quality according to the configuration. (85% is the default)
Use lossless compression.
Strip image profile and comments data.
Set the colour to RGB (recommend for the web)
Set the denisty to 72 pixels.
Set the 'Interlace' according to the file extension.