# Format

Controls the output properties of the image.

# Adaptive filter &afNew!

Use adaptive row filtering for reducing the PNG file size. This only works when the output image is png.

# Base64 (data URL) &encoding=base64

Encodes the image to be used directly in the src= of the <img>-tag. Use this link to see the output result.

More info: Issue #59 - Return image base64 encoded(opens new window).

//images.weserv.nl/?url=images.weserv.nl/lichtenstein.jpg&crop=100,100,720,530&encoding=base64

# Cache-Control &maxage=New!

Defines for how long an image should be cached by the browser. This will change the max-age of the Cache-Control HTTP-header.

We define a "far-future expiration" of 1 year by default. Valid durations that can be specified are:

  • 31d for 1 month
  • 62d for 2 months
  • 93d for 3 months
  • 186d for 6 months
  • 1 year (365 days) - default

Any other value will be ignored and the max-age will default to 1 year.

More info: Issue #186 - Increase Cache-Control: max-age= to 1 year instead of 1 month(opens new window).

//images.weserv.nl?url=images.weserv.nl/lichtenstein.jpg&w=100&maxage=31d

# Compression level &l=New!

The zlib compression level. Use a value between 0 (no Deflate) and 9 (maximum Deflate). The default value is 6. This only works when the output image is png.

# Default image &default=

If there is a problem loading an image, then an error is shown. However, there might be a need where instead of giving a broken image to the user, you want a default image to be delivered.

More info: Issue #37 - Return default image if the image's URL not found(opens new window).

The URL must not include a default querystring (if it does, it will be ignored).

Default image

# Filename &filename=

To specify the filename returned in the Content-Disposition header. The filename must only contain alphanumeric characters.

More info: Issue #122 - Specify filename(opens new window).

# Interlace / progressive &il

Adds interlacing to GIF and PNG. JPEGs become progressive.

More info: Issue #50 - Add parameter to use progressive JPEGs(opens new window).

Interlace / progressive

# Number of pages &n=New!

To select the number of pages to render. The default value is 1. Set to -1 to mean "until the end of the document".

TIP

-1 will be useful if you need to resize an animated WebP or GIF image.

Number of pages

# Output &output=

Encodes the image to a specific format. Accepts jpg, png, gif, tiff, webp or json. If none is given, it will honor the origin image format.

More info: Issue #62 - Format conversion(opens new window).

Output

# Page &page=

To load a given page (for an PDF, TIFF and multi-size ICO file). The value is numbered from zero. For a multi-resolution image, you can use -1 to get the largest page and -2 to get the smallest page.

# Quality &q=

Defines the quality of the image. Use values between 0 and 100. Defaults to 85. This only works when the output image is jpg, tiff or webp.

Quality