If you can use .NET 5, 6, or 7, use Imageflow.Server in place of ImageResizer. This readme is for ImageResizer 5.x for .NET Framework 4.x. Click for the ImageResizer 4.x, 3.x, or 2.x readme.
We've made some major changes in V5 to greatly improve image quality, file sizes, concurrency, maintainability, and response times. Read the changelog and follow suggestions in /resizer.debug when migrating from V4.
Quick Start: Install the ImageResizer.WebConfig NuGet package, run your app, then visit /resizer.debug
What can it do?
Enables fast on-demand image compression, resizing, and manipulation via the querystring.
Use `` and srcset without leaving your IDE (bye, Photoshop).
Makes implementing product and image galleries trivially easy.
Can process images from S3, Azure Blobs, and more (very extensible).
Cutting-edge low-latency disk caching to keep response times blazing fast.
Designed and hardened for server-side use.
Easy to use with a CDN, or behind a reverse proxy.
Extensive collection of plugins, including more than a dozen from the wider community.
Integrates with most CMSes, and is included by many.
Great for use with both public and private (secured) images; supports custom authorization rules.
Packages
ImageResizer includes an HttpModule for .NET Framework 4.7.2/4.8.
ImageResizer.WebConfig installs the HttpModule in Web.config.
ImageResizer.Plugins.Imageflow installs the Imageflow backend. Imageflow is what provides excellent image quality and file sizes, and is required for most image manipulation commands. If you're not using ASP.NET, you can use it directly via the Imageflow.Net package.
Imageflow.NativeRuntime.win-x86 (enable pre-release) installs the 32-bit imageflow.dll
Imageflow.NativeRuntime.win-x86_64 (enable pre-release) installs the 64-bit imageflow.dll. Keep this pacakge updated!
ImageResizer.Plugins.AzureReader2 allows processing images located in Azure Blob storage.
ImageResizer.Plugins.S3Reader2 allows processing images located in Amazon S3.
ImageResizer.Plugins.HybridCache is essential for scaling your website to high traffic. It offers an insanely well optimized, low latency disk cache with accurate space limiting. It replaces DiskCache and does everything better.
ImageResizer.Storage is useful for integrating ImageResizer with alternate image storage locations.
How do you apply commands?
ImageResizer has a very simple (and powerful) URL API.
In V5, ImageResizer rolled the vast majority of plugin features into ImageResizer.Plugins.Imageflow. That's why so many plugins are deprecated; they're duplicating Imageflow functionality.
In Application_Start, create an instance of the plugin and install it.
csharp
new PluginName().Install(ImageResizer.Configuration.Config.Current);
You will need to add the appropriate namespace reference to access the plugin.
Most configuration and plugin installation issues can be resolved by checking ImageResizer’s self-diagnostics page. If your local website is running at http://localhost:5000/, then you should browse to http://localhost:5000/resizer.debug.ashx to access it. See [the Troubleshooting](#troubleshooting section) for more details.
Reference
List of Plugins
The following is a list of all plugins currently available on ImageResizer, and links to their more detailed documentation on our website. They are grouped according to the license necessary to access them. Higher level licenses include all plugins from lower level licenses. Their order, from lowest to highest, is Essential, Performance, Creative, Elite. If you have any further questions about ImageResizer licenses, we encourage you to look at our licenses page.
Elite License Plugins
CropAround plugin - Automatic cropping based on a set of areas to preserve specified areas.
BatchZipper plugin - Asynchronously generated .zip archives of files and resized images. Great for providing customized downloads to customers.
WIC plugins (V3.1+)- 3 plugins: WicDecoder supports decoding images through WIC, and supports any image codecs installed on the computer. WicEncoder encodes jpeg, gif, and png images through WIC for better performance and more control. Adjust jpeg quality, subsampling, gif dithering, and palette size. WicBuilder provides a completely alternate pipeline, which supports most basic resize/crop/pad operations. 2-4x faster than the default pipeline. Enable on a per-request bass.
FreeImage plugins - Includes 4 plugins: FreeImageDecoder adds support for RAW & HDR source images - over 20 formats supported. FreeImageEcoder provides 2-4x Faster jpeg encoding. FreeImageResizer adds support for Lanczos3 and CatmullRom scaling. FreeImageBuilder provides an alternate imaging pipeline.
SeamCarving plugin - Content-aware image resizing (Fast C++ exe, requires Full Trust).
SimpleFilters plugin - Adjust photo transparency, brightness, and apply sepia and B&W filters through the querystring. Nearly zero performance overhead - matrix-based.
Watermark plugin(v3.1+) - Render multiple image & text overlays and background layers with incredible flexibility and great performance.
WhitespaceTrimmer plugin - Automatically trims whitespace off an image using smart edge detection.
Performance License Plugins
AnimatedGifs plugin - Process and resize GIF animations like normal GIF images. Every frame is processed and re-encoded.
AzureReader2 plugin - Allows blobstore images to be resized and served. Azure 2.0 compatible.
CloudFront plugin - Allows you to use Amazon CloudFront with the resizer. Highly recommended - offers inexpensive worldwide edge caching and great scalability.
DiskCache plugin - Makes dynamic image processing as responsive and scalable as static images - because they are! Suggested, nay, required for websites with significant traffic. Medium-trust compatible.
S3Reader2 plugin - Process and resize images located on a remote Amazon S3 bucket. A VirtualPathProvider. Works best when combined with DiskCache.
SQLReader plugin - Process and resize images located in a MS SQL database. Extremely configurable, can work with nearly any database schema. A VirtualPathProvider.
PrettyGifs plugin - Get rid of ugly .NET GIFs, and get photoshop-like results for GIFs and 8-bit PNG images. Uses tuned octree quantization and smart, adjustable dithering.
RemoteReader plugin - Allows images located on external servers to be securely resized and processed as if they existed locally.
FastScaling plugin - Offers up to 30x faster image resizing, and much higher quality.