Resizing images for devices

You can configure the system to automatically resize images to match the dimensions of device profiles:

  1. Open the Settings application.
  2. Select the Content -> Content management category.
  3. Enable the Resize images according to device profile setting.
  4. Click Save.

When a user views the website on a device that matches a certain profile, images automatically reduce their maximum side size to the larger of the dimensions set for the given profile.

To change the dimensions of device profiles:

  1. Open the Device profiles application.
  2. Edit () a profile.
  3. Set the Preview width and Preview height properties (the values are in pixels).
  4. Click Save.

Note: The resizing only works for images loaded through one of the Kentico system pages (getattachment, getmetafile, getmedia, etc.). Device profile resizing does not work for images that use web links or direct paths in their source.

Disabling the resizing for individual images

If you wish to disable device profile resizing for an image, add the resizemode=1 query string parameter to the image source URL.

For example:

<img src="~/getattachment/Community/Blogs/LargeImage.png.aspx?width=800&resizemode=1">

Was this page helpful?