Fork me on GitHub

The easiest way to get started is using NuGet. The basic packages are:

Each extension has its own NuGet package:


The DynamicImage package provides the primary DLL, SoundInTheory.DynamicImage.dll, and adds a DynamicImage.cs file to your App_Start folder, with the following code:

using Microsoft.Web.Infrastructure.DynamicModuleHelper;

[assembly: WebActivatorEx.PreApplicationStartMethod(typeof($namespace$.DynamicImage), "PreStart")]

namespace $namespace$.App_Start
	public static class DynamicImage
		public static void PreStart()

For DynamicImage to work correctly, all requests - not just page requests - must be processed by ASP.NET. For IIS Integrated Mode, make sure you have this line in your web.config:

  <modules runAllManagedModulesForAllRequests="true" />


The DynamicImage.Mvc package adds an HtmlHelper extension method, DynamicImageTag. This makes it easier to create images inline in your ASP.NET MVC views.

@Html.DynamicImageTag(b => b.WithLayer(LayerBuilder.Image.SourceFile("~/Assets/Images/Desert.jpg")
	.WithFilter(new ContentAwareResizeFilterBuilder().To(940, 300))))

The source code is on GitHub, so you can also download the source and build your own binaries.