Resizing Ektron DMS images using query string parameters

  • Updated

When presenting a DMS document on the front end of an Ektron site through the use of querystring parameters. This was first introduced in version 8.5 of Ektron.

As a note adjusting a dimension does not automatically preserve either the portion or the resolution of the picture. This is controlled by the EktronAssetServerModule, and customization could be added to the CMS to alter how the image is processed. This would likely require customizing the App_code\CSCode\EktronAssetServerModule.cs file, and there is not a sample of how this may be done.

Internally the Ektron CMS will use the System.Drawing.Graphics with the following options that cannot be overwritten.

graphicsPhoto.CompositingQuality = CompositingQuality.HighSpeed;
graphicsPhoto.InterpolationMode = InterpolationMode.HighQualityBicubic;
graphicsPhoto.CompositingMode = CompositingMode.SourceCopy;
graphicsPhoto.PixelOffsetMode = PixelOffsetMode.HighQuality;
graphicsPhoto.SmoothingMode = SmoothingMode.AntiAlias;

To resize the DMS image either the height or width could be adjusted using the ht or wd query string parameters. Further an automatically generated thumbnail could also be used through the use of a sz parameter. Bellow is an example of displaying a DMS document with a content ID of 555 and a site URL of http://SiteURL.

Example of resizing an image to have a height of 100 pixels and width of 200 pixels:


Example of using an automatically generated thumbnail: