Cake Build addin for optimizing images
- Kraken.io
Cake.ImageOptimizer is available as a nuget package from the package manager console:
Install-Package Cake.ImageOptimizer
or directly in your build script via a cake addin directive:
#addin "Cake.ImageOptimizer"
#addin "Cake.ImageOptimizer"
Task("Optimize")
.Description("Optimize images")
.Does(() =>
{
var settings = new ImageOptimizerSettings()
{
Services = "Kraken",
SearchFilter = "*.png",
ConfigFile = "./Files/config.xml"
};
OptimizeImages("./Files/Source", "./Files/Destination", settings);
});
RunTarget("Optimize");
A complete Cake example can be found here.
- Please be aware of the breaking changes that occurred with the release of Cake v0.22.0, you will need to upgrade Cake in order to use Cake.Services v0.1.0 or above.
If your looking to store images in S3 check out Cake.AWS.S3.
If your looking to distribute your images using CloudFront's CDN then check out Cake.AWS.CloudFront.
Copyright (c) 2015 - 2017 Phillip Sharpe
Cake.ImageOptimizer is provided as-is under the MIT license. For more information see LICENSE.
If this project helps you in anyway then please ⭐ the repository.