Skip to content

2sic/dnn-imageflow

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

73 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

DNN-Imageflow

Overview

The DNN-Imageflow module provides advanced image processing and optimization for DNN websites. It leverages the Imazen Imageflow.NET wrapper for Imageflow, a high-performance image processing library for servers.

This module is an upgrade to the popular dnn-imazen-imageresizer, commonly used with the 2sxc content management module for DNN. While the older version was based on ImageResizer, this module uses the next-generation Imageflow.

It is also similar to:


Installation

  1. Install DNN 9.11.0+ using nvQuickSite.
  2. Download the latest ToSic.Imageflow.Dnn_NN.NN.NN_Install.zip from the releases page.
  3. Install the extension using the DNN extension installation guide.
  4. For more DNN-related information, visit the DNN Community.

Note

  • During installation, the module will automatically unregister the older ImageResizer HTTP module in web.config.

Usage

Store image files in your DNN website (e.g., /Portals/0/Images/img.jpg). Use the Querystring API to manipulate images dynamically.

Features

  • Automatically crop whitespace
  • Sharpen images
  • Adjust white balance, contrast, saturation, and brightness
  • Rotate and flip images
  • Crop and resize images
  • Generate highly optimized JPEG or WebP images
  • More features...

Examples

<img src="img.jpg?w=50" />
<img src="img.jpg?width=100&height=100&mode=max&scale=down" /> 
<img src="img.jpg?w=300&h=300&mode=crop&scale=both" /> 
<img src="img.jpg?format=webp" /> 
<img src="img.jpg?s.grayscale=true" />
<img src="img.jpg?s.grayscale=ry" />
<img src="img.jpg?s.grayscale=bt709" />
<img src="img.jpg?s.grayscale=flat" />
<img src="img.jpg?s.sepia=true" />
<img src="img.jpg?s.invert=true" />
<img src="img.jpg?s.alpha=0.25" />
<img src="img.jpg?s.contrast=-0.80" />
<img src="img.jpg?s.brightness=0.5" />
<img src="img.jpg?s.saturation=-0.5" />

Caching

The module uses the high-performance Imazen.HybridCache by default. This in-memory persisted database tracks filenames and file bytes. Cache data is stored in App_Data\imageflow_hybrid_cache\.


Roadmap

Planned features include:

  • Watermarks
  • Presets
  • Extensionless paths
  • Mapped paths
  • Command defaults
  • And more...

Development Setup

  1. Clone this repository.
  2. Open the ToSic.Imageflow.Dnn solution in Visual Studio.
  3. Set the Release configuration in the Configuration Manager.
  4. Build the solution.
  5. If successful, the following extension packages will be available in the \InstallPackages folder:
    • ToSic.Imageflow.Dnn_NN.NN.NN_Install.zip
    • ToSic.Imageflow.Dnn_NN.NN.NN_Symbols.zip

References


Dependencies


Versioning

When updating the version, ensure the following files are updated:

  • Properties/AssemblyInfo.cs (update in 2 places)
  • ToSic.Imageflow.Dnn.dnn (update the package version)
  • ToSic.Imageflow.Dnn_Symbols.dnn (update in 2 places: package and dependency)
  • releasenotes.txt (update the version in 1 place)