Use Resize.XYZ to efficiently create, manage, and deliver images, personalized and optimized for every device and channel.

Samples

					https://img.resize.xyz/crop?type=auto&width=260&height=100&gravity=top&url=http://resize.xyz/fauna.jpg
					https://img.resize.xyz/thumbnail?type=auto&width=260&url=http://resize.xyz/fauna.jpg
				
fauna webp

crop

					#### GET | POST /crop
					Accepts: `image/*, multipart/form-data`. Content-Type: `image/*`

					Crop the image by a given width or height. Image ratio is maintained

					##### Allowed params

					- width `int`
					- height `int`
					- quality `int` (JPEG-only)
					- compression `int` (PNG-only)
					- type `string`
					- file `string` - Only GET method and if the `-mount` flag is present
					- url `string` - Only GET method and if the `-enable-url-source` flag is present
					- force `bool`
					- rotate `int`
					- embed `bool`
					- norotation `bool`
					- noprofile `bool`
					- flip `bool`
					- flop `bool`
					- stripmeta `bool`
					- extend `string`
					- background `string` - Example: `?background=250,20,10`
					- colorspace `string`
					- sigma `float`
					- minampl `float`
					- gravity `string`
					- field `string` - Only POST and `multipart/form` payloads
				

smartcrop

					#### GET | POST /smartcrop
					Accepts: `image/*, multipart/form-data`. Content-Type: `image/*`

					Crop the image by a given width or height using the [libvips](https://github.com/jcupitt/libvips/blob/master/libvips/conversion/smartcrop.c) built-in smart crop algorithm.

					##### Allowed params

					- width `int`
					- height `int`
					- quality `int` (JPEG-only)
					- compression `int` (PNG-only)
					- type `string`
					- file `string` - Only GET method and if the `-mount` flag is present
					- url `string` - Only GET method and if the `-enable-url-source` flag is present
					- force `bool`
					- rotate `int`
					- embed `bool`
					- norotation `bool`
					- noprofile `bool`
					- flip `bool`
					- flop `bool`
					- stripmeta `bool`
					- extend `string`
					- background `string` - Example: `?background=250,20,10`
					- colorspace `string`
					- sigma `float`
					- minampl `float`
					- gravity `string`
					- field `string` - Only POST and `multipart/form` payloads
					

Resize

					#### GET | POST /resize
					Accepts: `image/*, multipart/form-data`. Content-Type: `image/*`

					Resize an image by width or height. Image aspect ratio is maintained

					##### Allowed params

					- width `int` `required`
					- height `int`
					- quality `int` (JPEG-only)
					- compression `int` (PNG-only)
					- type `string`
					- file `string` - Only GET method and if the `-mount` flag is present
					- url `string` - Only GET method and if the `-enable-url-source` flag is present
					- embed `bool`
					- force `bool`
					- rotate `int`
					- norotation `bool`
					- noprofile `bool`
					- stripmeta `bool`
					- flip `bool`
					- flop `bool`
					- extend `string`
					- background `string` - Example: `?background=250,20,10`
					- colorspace `string`
					- sigma `float`
					- minampl `float`
					- field `string` - Only POST and `multipart/form` payloads
					

Enlarge

					#### GET | POST /enlarge
					Accepts: `image/*, multipart/form-data`. Content-Type: `image/*`

					##### Allowed params

					- width `int` `required`
					- height `int` `required`
					- quality `int` (JPEG-only)
					- compression `int` (PNG-only)
					- type `string`
					- file `string` - Only GET method and if the `-mount` flag is present
					- url `string` - Only GET method and if the `-enable-url-source` flag is present
					- embed `bool`
					- force `bool`
					- rotate `int`
					- norotation `bool`
					- noprofile `bool`
					- stripmeta `bool`
					- flip `bool`
					- flop `bool`
					- extend `string`
					- background `string` - Example: `?background=250,20,10`
					- colorspace `string`
					- sigma `float`
					- minampl `float`
					- field `string` - Only POST and `multipart/form` payloads
					

Extract

					#### GET | POST /extract
					Accepts: `image/*, multipart/form-data`. Content-Type: `image/*`

					##### Allowed params

					- top `int` `required`
					- left `int`
					- areawidth `int` `required`
					- areaheight `int`
					- width `int`
					- height `int`
					- quality `int` (JPEG-only)
					- compression `int` (PNG-only)
					- type `string`
					- file `string` - Only GET method and if the `-mount` flag is present
					- url `string` - Only GET method and if the `-enable-url-source` flag is present
					- embed `bool`
					- force `bool`
					- rotate `int`
					- norotation `bool`
					- noprofile `bool`
					- stripmeta `bool`
					- flip `bool`
					- flop `bool`
					- extend `string`
					- background `string` - Example: `?background=250,20,10`
					- colorspace `string`
					- sigma `float`
					- minampl `float`
					- field `string` - Only POST and `multipart/form` payloads
					

Zoom

					#### GET | POST /zoom
					Accepts: `image/*, multipart/form-data`. Content-Type: `image/*`

					##### Allowed params

					- factor `number` `required`
					- width `int`
					- height `int`
					- quality `int` (JPEG-only)
					- compression `int` (PNG-only)
					- type `string`
					- file `string` - Only GET method and if the `-mount` flag is present
					- url `string` - Only GET method and if the `-enable-url-source` flag is present
					- embed `bool`
					- force `bool`
					- rotate `int`
					- norotation `bool`
					- noprofile `bool`
					- stripmeta `bool`
					- flip `bool`
					- flop `bool`
					- extend `string`
					- background `string` - Example: `?background=250,20,10`
					- colorspace `string`
					- sigma `float`
					- minampl `float`
					- field `string` - Only POST and `multipart/form` payloads
					

Thumbnail

					#### GET | POST /thumbnail
					Accepts: `image/*, multipart/form-data`. Content-Type: `image/*`

					##### Allowed params

					- width `int`
					- height `int`
					- quality `int` (JPEG-only)
					- compression `int` (PNG-only)
					- type `string`
					- file `string` - Only GET method and if the `-mount` flag is present
					- url `string` - Only GET method and if the `-enable-url-source` flag is present
					- embed `bool`
					- force `bool`
					- rotate `int`
					- norotation `bool`
					- noprofile `bool`
					- stripmeta `bool`
					- flip `bool`
					- flop `bool`
					- extend `string`
					- background `string` - Example: `?background=250,20,10`
					- colorspace `string`
					- sigma `float`
					- minampl `float`
					- field `string` - Only POST and `multipart/form` payloads
					

Fit

					#### GET | POST /fit
					Accepts: `image/*, multipart/form-data`. Content-Type: `image/*`

					Resize an image to fit within width and height, without cropping. Image aspect ratio is maintained
					The width and height specify a maximum bounding box for the image.

					##### Allowed params

					- width `int` `required`
					- height `int` `required`
					- quality `int` (JPEG-only)
					- compression `int` (PNG-only)
					- type `string`
					- file `string` - Only GET method and if the `-mount` flag is present
					- url `string` - Only GET method and if the `-enable-url-source` flag is present
					- embed `bool`
					- force `bool`
					- rotate `int`
					- norotation `bool`
					- noprofile `bool`
					- stripmeta `bool`
					- flip `bool`
					- flop `bool`
					- extend `string`
					- background `string` - Example: `?background=250,20,10`
					- colorspace `string`
					- sigma `float`
					- minampl `float`
					- field `string` - Only POST and `multipart/form` payloads
					

Rotate

					#### GET | POST /rotate
					Accepts: `image/*, multipart/form-data`. Content-Type: `image/*`

					##### Allowed params

					- rotate `int` `required`
					- width `int`
					- height `int`
					- quality `int` (JPEG-only)
					- compression `int` (PNG-only)
					- type `string`
					- file `string` - Only GET method and if the `-mount` flag is present
					- url `string` - Only GET method and if the `-enable-url-source` flag is present
					- embed `bool`
					- force `bool`
					- norotation `bool`
					- noprofile `bool`
					- stripmeta `bool`
					- flip `bool`
					- flop `bool`
					- extend `string`
					- background `string` - Example: `?background=250,20,10`
					- colorspace `string`
					- sigma `float`
					- minampl `float`
					- field `string` - Only POST and `multipart/form` payloads
					

Flip

					#### GET | POST /flip
					Accepts: `image/*, multipart/form-data`. Content-Type: `image/*`

					##### Allowed params

					- width `int`
					- height `int`
					- quality `int` (JPEG-only)
					- compression `int` (PNG-only)
					- type `string`
					- file `string` - Only GET method and if the `-mount` flag is present
					- url `string` - Only GET method and if the `-enable-url-source` flag is present
					- embed `bool`
					- force `bool`
					- norotation `bool`
					- noprofile `bool`
					- stripmeta `bool`
					- flip `bool`
					- flop `bool`
					- extend `string`
					- background `string` - Example: `?background=250,20,10`
					- colorspace `string`
					- sigma `float`
					- minampl `float`
					- field `string` - Only POST and `multipart/form` payloads
					

Flop

					#### GET | POST /flop
					Accepts: `image/*, multipart/form-data`. Content-Type: `image/*`

					##### Allowed params

					- width `int`
					- height `int`
					- quality `int` (JPEG-only)
					- compression `int` (PNG-only)
					- type `string`
					- file `string` - Only GET method and if the `-mount` flag is present
					- url `string` - Only GET method and if the `-enable-url-source` flag is present
					- embed `bool`
					- force `bool`
					- norotation `bool`
					- noprofile `bool`
					- stripmeta `bool`
					- flip `bool`
					- flop `bool`
					- extend `string`
					- background `string` - Example: `?background=250,20,10`
					- colorspace `string`
					- sigma `float`
					- minampl `float`
					- field `string` - Only POST and `multipart/form` payloads
					

Convert

					#### GET | POST /convert
					Accepts: `image/*, multipart/form-data`. Content-Type: `image/*`

					##### Allowed params

					- type `string` `required`
					- quality `int` (JPEG-only)
					- compression `int` (PNG-only)
					- file `string` - Only GET method and if the `-mount` flag is present
					- url `string` - Only GET method and if the `-enable-url-source` flag is present
					- embed `bool`
					- force `bool`
					- rotate `int`
					- norotation `bool`
					- noprofile `bool`
					- stripmeta `bool`
					- flip `bool`
					- flop `bool`
					- extend `string`
					- background `string` - Example: `?background=250,20,10`
					- colorspace `string`
					- sigma `float`
					- minampl `float`
					- field `string` - Only POST and `multipart/form` payloads
					

Pipeline

					#### GET | POST /pipeline
					Accepts: `image/*, multipart/form-data`. Content-Type: `image/*`

					This endpoint allow the user to declare a pipeline of multiple independent image transformation operations all in a single HTTP request.

					**Note**: a maximum of 10 independent operations are current allowed within the same HTTP request.

					Internally, it operates pretty much as a sequential reducer pattern chain, where given an input image and a set of operations, for each independent image operation iteration, the output result image will be passed to the next one, as the accumulated result, until finishing all the operations.

					In imperative programming, this would be pretty much analog to the following code:
					```js
					var image
					for operation in operations {
					image = operation.Run(image, operation.Options)
					}
					```

					##### Allowed params

					- operations `json` `required` - URL safe encoded JSON with a list of operations. See below for interface details.
					- file `string` - Only GET method and if the `-mount` flag is present
					- url `string` - Only GET method and if the `-enable-url-source` flag is present

					##### Operations JSON specification

					Self-documented JSON operation schema:
					```js
					[
					{
					"operation": string, // Operation name identifier. Required.
					"ignore_failure": boolean, // Ignore error in case of failure and continue with the next operation. Optional.
					"params": map[string]mixed, // Object defining operation specific image transformation params, same as supported URL query params per each endpoint.
					}
					]
					```

					###### Supported operations names

					- **crop** - Same as [`/crop`](#get--post-crop) endpoint.
					- **smartcrop** - Same as [`/smartcrop`](#get--post-smartcrop) endpoint.
					- **resize** - Same as [`/resize`](#get--post-resize) endpoint.
					- **enlarge** - Same as [`/enlarge`](#get--post-enlarge) endpoint.
					- **extract** - Same as [`/extract`](#get--post-extract) endpoint.
					- **rotate** - Same as [`/rotate`](#get--post-rotate) endpoint.
					- **flip** - Same as [`/flip`](#get--post-flip) endpoint.
					- **flop** - Same as [`/flop`](#get--post-flop) endpoint.
					- **thumbnail** - Same as [`/thumbnail`](#get--post-thumbnail) endpoint.
					- **zoom** - Same as [`/zoom`](#get--post-zoom) endpoint.
					- **convert** - Same as [`/convert`](#get--post-convert) endpoint.
					- **watermark** - Same as [`/watermark`](#get--post-watermark) endpoint.
					- **blur** - Same as [`/blur`](#get--post-blur) endpoint.

					###### Example

					```json
					[
					{
					"operation": "crop",
					"params": {
					"width": 500,
					"height": 300
					}
					},
					{
					"operation": "watermark",
					"params": {
					"text": "I need some covfete",
					"font": "Verdana",
					"textwidth": 100,
					"opacity": 0.8
					}
					},
					{
					"operation": "rotate",
					"params": {
					"rotate": 180
					}
					},
					{
					"operation": "convert",
					"params": {
					"type": "webp"
					}
					}
					]
					```
					

Watermark

					#### GET | POST /watermark
					Accepts: `image/*, multipart/form-data`. Content-Type: `image/*`

					##### Allowed params

					- text `string` `required`
					- margin `int`
					- dpi `int`
					- textwidth `int`
					- opacity `float`
					- noreplicate `bool`
					- font `string`
					- color `string`
					- quality `int` (JPEG-only)
					- compression `int` (PNG-only)
					- type `string`
					- file `string` - Only GET method and if the `-mount` flag is present
					- url `string` - Only GET method and if the `-enable-url-source` flag is present
					- embed `bool`
					- force `bool`
					- rotate `int`
					- norotation `bool`
					- noprofile `bool`
					- stripmeta `bool`
					- flip `bool`
					- flop `bool`
					- extend `string`
					- background `string` - Example: `?background=250,20,10`
					- colorspace `string`
					- sigma `float`
					- minampl `float`
					- field `string` - Only POST and `multipart/form` payloads
					

Blur

					#### GET | POST /blur
					Accepts: `image/*, multipart/form-data`. Content-Type: `image/*`

					##### Allowed params

					- sigma `float` `required`
					- minampl `float`
					- width `int`
					- height `int`
					- quality `int` (JPEG-only)
					- compression `int` (PNG-only)
					- type `string`
					- file `string` - Only GET method and if the `-mount` flag is present
					- url `string` - Only GET method and if the `-enable-url-source` flag is present
					- embed `bool`
					- force `bool`
					- norotation `bool`
					- noprofile `bool`
					- stripmeta `bool`
					- flip `bool`
					- flop `bool`
					- extend `string`
					- background `string` - Example: `?background=250,20,10`
					- colorspace `string`
					- field `string` - Only POST and `multipart/form` payloads
				

list of available params

					Complete list of available params. Take a look to each specific endpoint to see which params are supported.
Image measures are always in pixels, unless otherwise indicated.

- **width**       `int`   - Width of image area to extract/resize
- **height**      `int`   - Height of image area to extract/resize
- **top**         `int`   - Top edge of area to extract. Example: `100`
- **left**        `int`   - Left edge of area to extract. Example: `100`
- **areawidth**   `int`   - Height area to extract. Example: `300`
- **areaheight**  `int`   - Width area to extract. Example: `300`
- **quality**     `int`   - JPEG image quality between 1-100. Defaults to `80`
- **compression** `int`   - PNG compression level. Default: `6`
- **rotate**      `int`   - Image rotation angle. Must be multiple of `90`. Example: `180`
- **factor**      `int`   - Zoom factor level. Example: `2`
- **margin**      `int`   - Text area margin for watermark. Example: `50`
- **dpi**         `int`   - DPI value for watermark. Example: `150`
- **textwidth**   `int`   - Text area width for watermark. Example: `200`
- **opacity**     `float` - Opacity level for watermark text. Default: `0.2`
- **flip**        `bool`  - Transform the resultant image with flip operation. Default: `false`
- **flop**        `bool`  - Transform the resultant image with flop operation. Default: `false`
- **force**       `bool`  - Force image transformation size. Default: `false`
- **nocrop**      `bool`  - Disable crop transformation enabled by default by some operations. Default: `false`
- **noreplicate** `bool`  - Disable text replication in watermark. Defaults to `false`
- **norotation**  `bool`  - Disable auto rotation based on EXIF orientation. Defaults to `false`
- **noprofile**   `bool`  - Disable adding ICC profile metadata. Defaults to `false`
- **stripmeta**   `bool`  - Remove original image metadata, such as EXIF metadata. Defaults to `false`
- **text**        `string` - Watermark text content. Example: `copyright (c) 2189`
- **font**        `string` - Watermark text font type and format. Example: `sans bold 12`
- **color**       `string` - Watermark text RGB decimal base color. Example: `255,200,150`
- **type**        `string` - Specify the image format to output. Possible values are: `jpeg`, `png`, `webp` and `auto`. `auto` will use the preferred format requested by the client in the HTTP Accept header. A client can provide multiple comma-separated choices in `Accept` with the best being the one picked.
- **gravity**     `string` - Define the crop operation gravity. Supported values are: `north`, `south`, `centre`, `west`, `east` and `smart`. Defaults to `centre`.
- **file**        `string` - Use image from server local file path. In order to use this you must pass the `-mount=dir` flag.
- **url**         `string` - Fetch the image from a remote HTTP server. In order to use this you must pass the `-enable-url-source` flag.
- **colorspace**  `string` - Use a custom color space for the output image. Allowed values are: `srgb` or `bw` (black&white)
- **field**       `string` - Custom image form field name if using `multipart/form`. Defaults to: `file`
- **extend**      `string` - Extend represents the image extend mode used when the edges of an image are extended. Allowed values are: `black`, `copy`, `mirror`, `white` and `background`. If `background` value is specified, you can define the desired extend RGB color via `background` param, such as `?extend=background&background=250,20,10`. For more info, see [libvips docs](http://www.vips.ecs.soton.ac.uk/supported/8.4/doc/html/libvips/libvips-conversion.html#VIPS-EXTEND-BACKGROUND:CAPS).
- **background**  `string` - Background RGB decimal base color to use when flattening transparent PNGs. Example: `255,200,150`
- **sigma**       `float`  - Size of the gaussian mask to use when blurring an image. Example: `15.0`
- **minampl**     `float`  - Minimum amplitude of the gaussian filter to use when blurring an image. Default: Example: `0.5`
- **operations**  `json`   - Pipeline of image operation transformations defined as URL safe encoded JSON array. See [pipeline](#get--post-pipeline) endpoints for more details.
- **sign**        `string` - URL signature (URL-safe Base64-encoded HMAC digest)