Quick start
- Download and unzip the package or install the NuGet package. If you're not using ASP.NET, read this guide.
- In Visual Studio, right click your project and choose "Add reference". Browse to the extracted folder, and choose
dlls\release\ImageResizer.dll. Or just copy it into the 'bin' folder. Whichever you prefer. (Compatible with .NET 2-4). Modify or create the /Web.Config file for your site:
<?xml version="1.0" encoding="utf-8" ?> <configuration> <configSections> <section name="resizer" type="ImageResizer.ResizerSection,ImageResizer" requirePermission="false" /> </configSections> <resizer> <!-- Unless you (a) use Integrated mode, or (b) map all reqeusts to ASP.NET, you'll need to add .ashx to your image URLs: image.jpg.ashx?width=200&height=20 --> <pipeline fakeExtensions=".ashx" /> <plugins> <!-- <add name="DiskCache" /> --> <!-- <add name="PrettyGifs" /> --> </plugins> </resizer> <system.web> <httpModules> <!-- This is for IIS5, IIS6, and IIS7 Classic, and Cassini/VS Web Server--> <add name="ImageResizingModule" type="ImageResizer.InterceptModule"/> </httpModules> </system.web> <system.webServer> <validation validateIntegratedModeConfiguration="false"/> <modules> <!-- This is for IIS7+ Integrated mode --> <add name="ImageResizingModule" type="ImageResizer.InterceptModule"/> </modules> </system.webServer> </configuration>Start your web site, then visit /resizer.debug.ashx to verify you've done everything correctly. If you ever encounter issues, simply revisit that page to access the self-diagnostics. If you need help, just ask! ASP.NET MVC is fully supported, just install the MvcRoutingShim plugin.
Increase performance and add features with plugins! Buying one of our awesome plugins gives you access to priority support and funds open-source development. How can you resist?
Relax and have fun! This software has been refined and improved since its creation in 2007, with a focus on security, stability, and performance. Check out the history of the project. Unlike all the sample code you find on the internet, it avoids the 29 common image resizing pitfalls. Please share your ideas and feedback.
Spread the word! Tell your friends and co-workers about this library. And click the +1 button to tell Google Plus that this is an awesome site.
Using version 2? Read why you should upgrade and check out the migration guide.