Mastering Nginx

(Ron) #1

NGINX for the Developer


[ 182 ]

Directive Explanation


  • size: Emits information about an
    image in JSON format.

  • rotate: Rotates an image counter-
    clockwise by either 90, 180, or 270
    degrees.

  • resize: Reduces an image
    proportionally by the width and
    height given. One dimension may
    be "-" in order to reduce by only
    the other dimension. If combined
    with rotate, rotation happens
    after reduction. An error will result
    in returning 415 (Unsupported
    Media Type).

  • crop: Reduces an image by the size
    of the largest side, as specified by
    the width and height given. Any
    extraneous space along the other
    edges will be cut. One dimension
    may be "-" in order to reduce by only
    the other dimension. If combined
    with rotate, rotation happens
    before reduction. An error will result
    in returning 415 (Unsupported Media
    Type).
    imagefilter
    buffer


The size of the buffer used to process
images. If more memory is needed, the
server will return a 415 error (Unsupported
Media Type).
image_filter_jpeg_
quality

The quality of the resulting JPEG image,
after processing. Not recommended to
exceed 95.
image_filter_
sharpen

Increases the sharpness of a processed
image by this percentage.
image_filter_
transparency

Disables preserving transparency of
transformed GIF and PNG images.
The default on preserves transparency.

Note that the empty_gif directive is not part of the image_filter module, but is
included in a default installation of NGINX.

Free download pdf