Image Resizer Documentation Wednesday, August 06, 2008

Upgrading from version 1.0? Read the upgrade notes.

Installation

First, make sure that IIS is passing image requests to ASP.NET. This is default behavior for Cassini and IIS7 integrated mode, but not for IIS5, 6, and 7 classic pipeline. If you already have wildcard mapping set up, then you can skip this step.

Second, drop the code files into a folder in App_Code. If you aren't using C#, then put the Dll into the /bin directory.

Third, you will need to modify web.config to integrate the handler (for version 1.0) or the module (for version 1.2).

Last, you'll need a few application settings. You can copy and paste all of these, but only ImageDiskCacheDir and MaxCachedImages are required for operation of the image resizer.


    <!-- The directory to store cached version of images. Relative to the application root -->
    <add key="ImageDiskCacheDir" value="imagecache"/>

    <!-- How many files to keep in the cache. The 10% least recently used files will be deleted 
when this limit is reached -->
    <add key="MaxCachedImages" value="800"/>

    <!-- The following settings are optional: -->

    <!-- The maximum size to permit images to be resized to. -->
    <add key="ImageResizerMaxWidth" value="1680" />
    <add key="ImageResizerMaxHeight" value="1680" />

    <!-- Takes effect in version 1.2. The default (for all versions) is 1440 minutes (24 hours).
        Set to 0 to disable *client* caching (304 "Not Modified" responses will still be returned 
        if nothing has changed). Client caching is not related to disk caching. -->
    <add key="ImageResizerClientCacheMinutes" value="1440" />
    
    <!-- This enables /resize(x,y,f)/image.jpg notation in v1.2. Enabling this
      will make URL authorization ineffective on image files. -->
    <add key="AllowFolderResizeNotation" value="false" />