Image Resizer : API Documentation

Type IEPngFix

Namespace ImageResizer.Plugins.Basic

Interfaces IPlugin, IQuerystringPlugin

Causes IE6 and earlier to use GIF versions of PNG files. By default, only fixes requests with ?iefix=true in the querystring. When catchall is enabled, it will filter all png images, unless iefix=false on those requests. Not compatible with CDNs or proxy servers, as they do not allow varying by user agent reliably.

Methods

Properties

Public static methods

bool NeedsPngFix(HttpContext context)

Returns true if the user agent string specifies MSIE versions 1 through 6 for Windows. Cached in context.Items after first call.

Public properties

bool CatchAll get; set;

If true, 'iefix=true' will be the default for all PNG images, instead of 'iefix=false'.

bool Redirect get; set;

If true, the requests from IE will be HTTP redirected to new URLs. If false, the GIF will be silently served instead of the PNG, without any redirection. A CDN or caching proxy will mess things up regardless, but using redirection ensures that the CDN/proxy never caches the GIF version instead of the PNG.