Resizing images for devices
You can configure the system to automatically resize images to match the dimensions of device profiles:
- Open the Settings application.
- Select the Content -> Content management category.
- Enable the Resize images according to device profile setting.
- 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:
- Open the Device profiles application.
- Edit () a profile.
- Set the Preview width and Preview height properties (the values are in pixels).
- 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">