https://github.com/cofoundry-cms/cofoundry.plugins.imaging.imagesharp
Handle image validation and resizing in Cofoundry using the cross platform ImageSharp library
https://github.com/cofoundry-cms/cofoundry.plugins.imaging.imagesharp
Last synced: 8 months ago
JSON representation
Handle image validation and resizing in Cofoundry using the cross platform ImageSharp library
- Host: GitHub
- URL: https://github.com/cofoundry-cms/cofoundry.plugins.imaging.imagesharp
- Owner: cofoundry-cms
- License: mit
- Created: 2017-06-29T10:10:16.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2025-01-04T10:32:54.000Z (over 1 year ago)
- Last Synced: 2025-08-21T23:59:07.385Z (10 months ago)
- Language: C#
- Size: 73.2 KB
- Stars: 1
- Watchers: 3
- Forks: 1
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Cofoundry.Plugins.Imaging.ImageSharp
[](https://ci.appveyor.com/project/Cofoundry/cofoundry-plugins-imaging-imagesharp)
[](https://www.nuget.org/packages/Cofoundry.Plugins.Imaging.ImageSharp/)
This library is a plugin for [Cofoundry](https://www.cofoundry.org). For more information on getting started with Cofoundry check out the [Cofoundry repository](https://github.com/cofoundry-cms/cofoundry).
## 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](https://github.com/cofoundry-cms/cofoundry/wiki/Images).
This plugin uses the cross platform [ImageSharp](https://github.com/SixLabors/ImageSharp) package to resize images dynamically. ImageSharp has a number of benefits over our [SkiaSharp imaging package](https://github.com/cofoundry-cms/Cofoundry.Plugins.Imaging.SkiaSharp):
- Support for (animated) GIFs
- An extensive range of configuration options
- The ability to preserve EXIF data
- Fully cross-platform
- A commercial support model
ImageSharp is licensed under the [Six Labors Split License](https://github.com/SixLabors/ImageSharp/blob/main/LICENSE), see [the Six Labors website for more information on licensing options](https://sixlabors.com/).
## 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 achieved by changing the ImageSharp configuration manually. Check out the [ChangeDefaultEncoderOptions](https://github.com/SixLabors/ImageSharp/tree/master/samples/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();`.