Handle image validation and resizing in Cofoundry using the cross platform ImageSharp library
Clone or download
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
src
.gitattributes Initial commit Jun 29, 2017
.gitignore Initial commit Jun 29, 2017
GitVersion.yml Initial commit Jun 29, 2017
LICENSE
README.md Updated to latestest stable Cofoundry release and prepared the build … Feb 22, 2018
appveyor.yml
build.cake Copyright update Jan 2, 2019
build.ps1 Initial commit Jun 29, 2017

README.md

Cofoundry.Plugins.Imaging.ImageSharp

Build status NuGet Gitter

This library is a plugin for Cofoundry. For more information on getting started with Cofoundry check out the Cofoundry repository.

Overview

Cofoundry does not have a default image resizing implementation and relies on plugins to add this functionality. For more info on image resizing in Cofoundry check out the imaging documentation.

This plugin uses the cross platform ImageSharp package to resize images dynamically.

NB: ImageSharp is still in beta and so this package is flagged as pre-release. Read the nuget Installing and updating pre-release packages for guidance on installing if you're not familiar with this process.

Configuration

The services register themselves automatically so typically no other configuration is required. The following configuration settings can be used to tweak the image output:

  • Cofoundry:Plugins:ImageSharp:JpegQuality Jpeg quality setting out of 100. Defaults to 85.
  • Cofoundry:Plugins:ImageSharp:IgnoreMetadata Indicates whether the metadata should be ignored when the image is being encoded. Defaults to true.

If you need more control over the image configuration this can be acheived by changing the ImageSharp configuration manually. Check out the ChangeDefaultEncoderOptions sample for more information. Our default configuration is set during the Cofoundry startup process, so you'll need to apply your settings after you've called app.UseCofoundry();.