ImageResizer icon


Lightweight HttpModule, REST API, and managed API for *safe* and highly-optimized server-side image processing.



Works with .NET 4.5.1+, ASP.NET WebForms, MVC 1-4, WebAPI, Routing, IIS 7, 7.5, & 8, 8.1 and nearly all CMSes.

Use ether the URL API: image.jpg?width=100&height=100 *or* the Managed API: ImageBuilder.Current.Build(source,dest,settings).

ImageResizer provides incredible quality and highly-optimized image processing - by default. Don't leak memory by using System.Drawing directly or create horrible previews with GetThumbnailImage. Add the ImageResizer.Plugins.DiskCache package to serve dynamic images as fast as static ones.

With this library, you can create beautiful image galleries, product thumbnails, and fast, scalable websites *without* sacrificing agility or responsive web design.

## Functionality in this package

The ImageResizer core package lets you:


Decode jpeg, png, gif, tiff, and bmp files from uploads, streams, byte arrays, and files.

2. Pre-rotate or flip (based on gravity sensor OR manual angle).

3. Apply manual cropping in either source or screen coordinates.


Efficiently apply width and/or height constraints, using any of several constraint modes: max, pad, crop, or stretch. Provides the highest quality image resampling (bicubic 2-pass) available on the windows platform.

5. Rotate, flip, add borders, padding, margins, with custom colors.

3. Re-compress into jpeg (with adjustable compression) or lossless png form - as a byte array, stream, or file.

All through a REST API and Managed API with a symmetrical command set.

URL rewriting, custom authorization, 404 fallbacks, gradient generation, exif stripping, size limiting, and cache-control customization are also included in the core DLL.

## 30+ plugins available

Search 'ImageResizer' on, or visit to see 40+ plugins. Some offer 4-30x performance improvements; some render PDFs and PSDs; others detect faces and trim whitespace.
You'll find plugins for disk caching, memory caching, Microsoft SQL blob support, Amazon CloudFront, S3, Azure Blob Storage, MongoDB GridFS, automatic whitespace trimming, automatic white balance, octree 8-bit gif/png quantization and transparency dithering, animated gif resizing, watermark & text overlay support, content aware image resizing / seam carving (based on CAIR), grayscale, sepia, histogram, alpha, contrast, saturation, brightness, hue, Guassian blur, noise removal, and smart sharpen filters, psd editing & rendering, raw (CR2, NEF, DNG, etc.) file exposure, .webp (weppy) support, image batch processing & compression into .zip archives, red eye auto-correction, face detection, and secure (signed!) remote HTTP image processing. Most datastore plugins support the Virtual Path Provider system, and can be used for non-image files as well.

## Third-party integration

Third parties have made some excellent UI wrappers and plugins, including Eksponent CropUp, FluentExtensions, jQuery NailThumb, WebCropImage, and mindrevolution's ResponsivePresets.


- Last update: 6/22/2017
- Version: 4.1.9
- Project documentation:
- Read more info on
This package has 0 dependencies.
65 packages depend on this package.

Run this command from the Package Manager Console:

Install-Package ImageResizer

Resize Resizing Crop photo image Drawing WPF caching JPEG JPG GIF png MVC IIS plugins Azure blob zip Batch compress Amazon S3 format handling url Routing Logging nlog PSD Remote path provider virtualpathprovider CAIR content aware Flat size sql database query Watermark Text Images Thumbnails Background ImageResizer ImageResizing.Net Resizer Cropper Cropping automatic jCrop asp:Image Rotate Flip System.Drawing WIC disk transparency octree quanitization animated gifs dithering Gaussian blur sharpen sharpening radius contrast saturation hue brightness histogram sepia grayscale invert color pixel shader noise removal exif rotation autorotate azurereader worker blobstore cache-control expires cloudfront quality drop shadow 404 rewriting gradient freeimage CatmullRom Lanczos3 bspline box bicubic bilinear CRW CR2 NEF RAF DNG MOS KDC DCR redirect actionresult download webclient virtual seam carving alpha channel y ry ntsc bt709 limit sizelimiting getthumbnailimage bitmap folder overlay whitespace trimming product padding pad margin borders bgcolor InterpolationMode Fant IWICBitmap IWICBitmapSource server-safe-imaging nuget-needs-tokenization nuget-needs-markdown-descriptions imaging


Did you write a blog post and have a URL to share about this package? Tips and tricks? Please submit your links and reviews.

Please login first. It's easy! Just use your Google or Microsoft account.