A simple plugin for Umbraco which allows you to optimise media using TinyPNG or ImageProcessor.
https://www.nuget.org/packages/punkOptimise.Core
Install-Package punkOptimise.Core
- Umbraco 8.4+
-
Install the nuget package:
Install-Package punkOptimise.Core
-
Add the following config to your web.config:
<add key="punkOptimise:ReduceFileExtensions" value="jpg,jpeg" />
<add key="punkOptimise:ShrinkfileExtensions" value="png" />
<add key="punkOptimise:DefaultQuality" value="70" />
<add key="punkOptimise:TinyPng:ApiUrl" value="https://api.tinify.com/shrink" />
<add key="punkOptimise:TinyPng:ApiKey" value="" />
-
Complete the TinyPNG developer API key registration: https://tinypng.com/developers
-
Add the key to the config above: punkOptimise:TinyPng:ApiKey