3 votes

SmallerImages

If you want to reduce the file size of images uploaded to your Umbraco website, then this is the package for you. You can set a maximum width and height, this package will replace the original image with a smaller cropped version. It also allows you to create another crop of the image, perhaps a smaller preview size image.

To use this in your Umbraco website, the best way to install it is using NuGet:

Install-Package SmallerImages

Then just add these app settings to your web.config file and edit the values accordingly:

<add key="ImageResizeWidth" value="1920" />
<add key="ImageResizeHeight" value="1080" />
<add key="ImageResizeSuffix" value="1080p" />
<add key="ImageResizeKeepOriginal" value="false" />
<add key="ImageResizeUpscale" value="false" />
<add key="ImageResizePreviewWidth" value="240" />
<add key="ImageResizePreviewHeight" value="136" />
<add key="ImageResizePreviewSuffix" value="_preview" />
<add key="ImageResizeMaintainRatio" value="false" />
<add key="ImageResizeApplyToExistingImages" value="true" />

FAQs

  • Does it work with existing images?

    Yes it does, you can enable it by setting this appSetting value to true

    <add key="ImageResizeApplyToExistingImages" value="true" />
  • How do I turn off the preview image crop?

    Change these config settings to the values as they are below:

    <add key="ImageResizePreviewWidth" value="0" />
    <add key="ImageResizePreviewHeight" value="0" />
    <add key="ImageResizePreviewSuffix" value="" />
  • What happens to the original image?

    It's completely up to you. If you don't want to keep it you can set this value to false, otherwise set it to true.

    <add key="ImageResizeKeepOriginal" value="false" />

Screenshots

Project owner

Paul Seal from codeshare.co.uk

Paul Seal from codeshare.co.uk

Paul has 1073 karma points

Project Compatibility

This project is compatible with the following versions as reported by community members who have downloaded this package:
Untested or doesn't work on Umbraco Cloud
7.7.x (untested)
7.6.x (untested)
7.5.x (untested)
7.4.x (untested)
7.3.x (untested)
7.2.x (untested)
7.1.x (untested)
7.0.x (untested)
6.1.x (untested)
6.0.x (untested)

You must login before you can report on package compatibility.

Project Information

  • Project owner: Paul Seal from codeshare.co.uk
  • Created: 14/11/2017
  • Current version 1.0.0
  • .net Version 4.5
  • License MIT
  • Downloads: 15

External resources