Specialist HTTP directives
image_filter (http-image-filter)
Image transformation directive; exact forms depend on operation and module availability.
Formal Syntax & Structure
nginx syntaxnginx
image_filter off | test | size; OR image_filter rotate angle; OR image_filter resize width height; OR image_filter crop width height;Parameters & Attributes
| Name | Type | Description |
|---|---|---|
| mode | off | test | size | rotate | resize | crop | Select operation. Module requires libgd and compatible build. |
| angle | 90 | 180 | 270 | supported expression | Required only in rotate mode. |
| width | positive dimension | - | supported expression | Required for resize or crop; dash can leave one dimension unconstrained. |
| height | positive dimension | - | supported expression | Required for resize or crop; both dimension positions must be supplied. |
Working Example
Example Snippetnginx
image_filter size;