Image traffic is often a large fraction of a page load, and it usually deserves its own treatment when you are debugging caching, throttling, or asset delivery. The imageFilter gives you a single selector that covers every modern image format, so you can tag, log, or rewrite media calls without enumerating MIME types by hand.
Use imageFilter when a rule should run only on responses returning an image, regardless of the specific format. The filter checks the response Content-Type for an image/* value, so it covers PNG, JPEG, GIF, WebP, AVIF, SVG, and any other image type a server might emit.
Common scenarios:
Label image responses so they stand out from HTML and API traffic in the session viewer.
rules:
- filter:
typeKind: ImageFilter
actions:
- typeKind: ApplyTagAction
tag:
value: image-asset
Tell the client to cache images aggressively when debugging cache invalidation issues.
rules:
- filter:
typeKind: FilterCollection
operation: And
children:
- typeKind: ImageFilter
- typeKind: HostFilter
pattern: cdn.example.com
operation: Exact
actions:
- typeKind: AddResponseHeaderAction
headerName: cache-control
headerValue: public, max-age=31536000, immutable
Cap bandwidth on image traffic only, to observe how a page degrades under slow media loading.
rules:
- filter:
typeKind: ImageFilter
actions:
- typeKind: AverageThrottleAction
bandwidthBytesPerSeconds: 16384
Select exchanges having response content type mime matching image.
Evaluation scope defines the timing where this filter will be applied.
responseHeaderReceivedFromRemote This scope occurs the moment fluxzy has done parsing the response header.
imageFilter
This filter has no specific characteristic
The following table describes the customizable properties available for this filter:
| Property | Type | Description | DefaultValue |
|---|---|---|---|
| inverted | boolean | Negate the filter result | false |
The following examples apply a comment to the filtered exchange
Select exchanges having response content type mime matching image.
rules:
- filter:
typeKind: ImageFilter
actions:
- typeKind: ApplyCommentAction
comment: filter was applied
View definition of ImageFilter for .NET integration.
The following filters are related to this filter:
Yes. Any Content-Type starting with image/ is matched, which covers modern formats like SVG, AVIF, and WebP alongside the classics.
No. The filter trusts the header. Combine it with body inspection or responseHeaderFilter if you need to validate against the payload.
Yes. Combine imageFilter with an inverted responseHeaderFilter matching the format you want to skip, all inside a FilterCollection with the And operation.