MvcRoutingShim plugin

Prevents ASP.NET MVC routes from conflicting with the ImageResizer. Takes a minimalist approach by disabling MVC routing only for requests that the ImageResizer is actually working on. Note that you still may need to add IgnoreRoute statements to allow the original images to be viewed without using the ImageResizer.

Included in 3.0.12+


Either run Install-Package ImageResizer.MvcWebConfig in the NuGet package manager (this will also install the HttpModule settings), or:

  1. Add a reference to ImageResizer.Mvc.dll, or run "Install-Package ImageResizer.Mvc" in the NuGet package manager.
  2. Add <add name="MvcRoutingShim" /> in the <plugins /> section of Web.config. (The NuGet package doesn't add this automatically).

This plugin (MvcRoutingShim plugin) is part of the Essential edition

Where is the plugins section?

The <plugins> section is located in Web.config, and is nested inside the <resizer> element, which is nested inside <configuration>. For examples, see this sample Web.config file.

Where can I find the dll?

We prefer that you install via NuGet, but you can also find the plugin DLL files in the /dlls/release folder of your download.

How do I typically install a plugin via Web.Config?

  1. In Visual Studio, right click on your project and choose "Add reference". Browse to the plugin DLL and click "OK".
  2. In the <plugins> section of Web.config, insert <add name="PluginName" />
  3. Look at the plugin documentation to see what configuration options (if any) are available.

How do I typically install a plugin via code?