Image Resizer : API Documentation

Type PipelineConfig

Namespace ImageResizer.Configuration

Interfaces IPipelineConfig, ICacheProvider, ISettingsModifier

Events

OnFirstRequest

Fired once, on the first PostAuthorizeRequest event.

PostAuthorizeRequestStart

Fires during the PostAuthorizeRequest phase, prior to any module-specific logic. Executes for every request to the website. Use only as a last resort. Other events occur only for image requests, and thus have lower overhead.

Rewrite

Fired during PostAuthorizeRequest, after ResizeExtension has been removed. On fired on requests with extensions that match supported image types.

You can add additonal supported image extentions by registering a plugin that implementes IQuerystringPlugin, or you can add an extra extension in the URL and remove it here. Example:.psd.jpg

RewriteDefaults

Fired during PostAuthorizeRequest, after Rewrite. Any changes made here (which conflict) will be overwritten by the the current querystring values. I.e, this is a good place to specify default settings.

Only fired on accepted image types. (see Rewrite)

PostRewrite

Fired after all other rewrite events.

Only fired on accepted image types. (see Rewrite)

AuthorizeImage

Fired after all rewriting is finished. e.AllowAccess defaults to the result of the UrlAuthorization module's verdict. It can be changed. Set e.AllowAccess to true to cause and 403 Access Dened result.

ImageMissing

Fired when the specified image doesn't exist. Only called for images that would normally be processed. May be called during PostAuthorizeRequest or later - End the request completely with a redirect if you want alternate behavior.

PreHandleImage

Fired immediately before the image request is sent off to the caching system for proccessing. Allows modification of response headers, caching arguments, and callbacks.

SelectCachingSystem

Public properties

ICollection<string> AcceptedImageExtensions get;

Returns a unqiue copy of the image extensions supported by the pipeline. Performs a cached query to all registered IQuerystringPlugin instances. Use IsAcceptedImageType for better performance.

IList<string> FakeExtensions get;

Cached access to pipeline.fakeExtensions

bool IsHandlingRequest get;

Returns true if the current request is being processed and/or cached by the pipeline. Will return false until *after* the FileExists method is called on the VirtualPathProviders, which is after the AuthorizeImage event fires. This will return a usable value if used from VirtualFile.Open(), or if used inside the PreHandleImage event or later.

string ModifiedPathKey get;

NameValueCollection ModifiedQueryString get; set;

Returns the modified query string. If never set, returns a copy of Request.QueryString. Returns the same instance if called multiple times. Copy it if you want to make changes without causing issues.

string ModifiedQueryStringKey get;

bool ModuleInstalled get; set;

True once the InterceptModule has been installed and is intercepting requests.

string PreRewritePath get; set;

Returns the value of Context.Items["resizer.newPath"] if present. If not, returns FilePath + PathInfo. Sets Context.Items["resizer.newPath"]. Only useful during the Pipeline.PostAuthorizeRequestStart event.

long ProcessedCount get;

The number of images processed by this pipeline.

string ResponseArgsKey get;

bool SkipFileTypeCheck get; set;

Get or sets whether the file extension check should be applied to the current request. Defaults to true. If set to true, will only affect the current request, and will only cause the Resizer to evaluate the rewriting rules on the request. Processing may still not occur if no querystring values are specified. Add 'cache=always' to force caching to occur.

string SkipFileTypeCheckKey get;

string StopRoutingKey get;

ICollection<string> SupportedQuerystringKeys get;

Returns a unqiue copy of all querystring keys supported by the pipeline. Performs a cached query to all registered IQuerystringPlugin instances. Use HasPipelineDirective for better performance. (binary search)

VppUsageOption VppUsage get;