ImageResizer  3.4.0
 All Classes Namespaces Functions Variables Enumerations Enumerator Properties Events
Public Member Functions | Protected Member Functions | List of all members
ImageResizer.Plugins.Basic.Image404 Class Reference

Redirects image 404 errors to a querystring-specified server-local location, while maintaining querystring values so layout isn't disrupted. More...

Inheritance diagram for ImageResizer.Plugins.Basic.Image404:
Inheritance graph
[legend]
Collaboration diagram for ImageResizer.Plugins.Basic.Image404:
Collaboration graph
[legend]

Public Member Functions

IPlugin Install (Configuration.Config c)
 
bool Uninstall (Configuration.Config c)
 
IEnumerable< string > GetSupportedQuerystringKeys ()
 If the plugin reads any values from the querystring, the names of the keys should be specified here. This information is required so that the HttpModule knows when to handle an image request. More...
 
- Public Member Functions inherited from ImageResizer.Plugins.IPlugin
IPlugin Install (Config c)
 Installs the plugin in the specified Config instance. The plugin must handle all the work of loading settings, registering the plugin etc. More...
 
bool Uninstall (Config c)
 Uninstalls the plugin. Should reverse all changes made during Install More...
 

Protected Member Functions

string resolve404Path (string path)
 

Detailed Description

Redirects image 404 errors to a querystring-specified server-local location, while maintaining querystring values so layout isn't disrupted.

For example, missingimage.jpg?404=image.jpg&width=200 with the default setting <image404 baseDir="~/" /> will redirect to ~/image.jpg?width=200. You may also configure 'variables', which is the reccomended approach. Ex. <image404 propertyImageDefault="~/images/nophoto.png" /> and use them like so: missingimage.jpg?404=propertImageDefault?width=200 -> ~/images/nophoto.png?width=200. Querystring values in the variable value take precedence. For example, Ex. <image404 propertyImageDefault="~/images/nophoto.png?format=png" /> and missingimage.jpg?format=jpg&404=propertImageDefault?width=200 -> ~/images/nophoto.png?format=png&width=200.

Definition at line 21 of file Image404.cs.

Member Function Documentation

IEnumerable<string> ImageResizer.Plugins.Basic.Image404.GetSupportedQuerystringKeys ( )
inline

If the plugin reads any values from the querystring, the names of the keys should be specified here. This information is required so that the HttpModule knows when to handle an image request.

Returns

Implements ImageResizer.Plugins.IQuerystringPlugin.

Definition at line 82 of file Image404.cs.

82  {
83  return new string[] { "404" };
84  }

The documentation for this class was generated from the following file: