These parameters allow changing image formats and different parameters related to those formats.
input size
Gumlet supports input images up to 16384x16384 pixels. This limit is only available in Business and Enterprise plans. For the Free plan, the input image size is limited to 6000x6000 pixels. If the input image is bigger than this, Gumlet will not process the image and only pass it through. For the growth plan, the limit is 8192x8192 pixels.
input formats
Gumlet supports the following input formats: JPEG
, JPEG2000
, PNG
, WebP
, JPEG-XL
, TIFF
, PDF
, GIF
, SVG
, RAW
, HEIF
, AVIF
.
output formats
Gumlet supports image output in the following formats: JPEG
, PNG
, JPEG-XL
, WebP
, TIFF
, GIF
, SVG
, RAW
, HEIF
, AVIF
.
metadata
Controls whether image metadata from the original image should be kept in the output image. If this parameter is set to true
all metadata is kept.
The default value is false
means all metadata will be removed to ensure the smallest output image size.
format (fm)
Gumlet serves the same image format as the source image after performing operations. If you want to change the output image format, you can use this parameter.
You can use auto
, jpeg
, jpg
, jxl
, png
, webp
, tiff
, json
, avif
, heif
or raw
. If the original image has an alpha channel and the output does not support transparency, a white
background is applied if background
parameter is not provided.
If you use format=auto
Gumlet automatically detects the best format according to the user's browser. For example, Google Chrome supports WebP hence that format will be delivered to users visiting with Chrome browser. When user browser does not support WebP, the default image format as per the original image, is served. WebP image is almost always a smaller size for the same image quality, which results in lower bandwidth usage and faster load times.
json
format=json
will return information about the input image or PDF. For example: https://demo.gumlet.io/boat.jpeg?format=json
{
"format": "jpeg",
"size": 68751,
"width": 752,
"height": 498,
"space": "srgb",
"channels": 3,
"density": 72,
"chromaSubsampling": "4:2:0",
"isProgressive": true,
"hasProfile": false,
"hasAlpha": false
}
If you would like to detect faces along with JSON information, you can pass faces=true
along with format=json
and the API will return detected face coordinates with other information.
For example if you are using Chrome, all images you saw above are delivered as WebP and not as JPEG. You can check it in content-type
response header.
If you check the total downloaded content in the "Network" tab of Chrome and Firefox, you will see Chrome uses less bandwidth because of WebP image delivery.
pdf
PDF files can be converted to images using the Gumlet API. You need to use page
parameter to extract the given page from a PDF file.
gif
We also support processing GIF images. If source image is GIF, you can pass any of width
, height
, stretch
, extract
, flip
, rotate
and gamma
parameters while processing them. Other operations are not supported for GIF images as of now.
width=200 | original | |
---|---|---|
![]() | ![]() |
Converting other formats to GIF or converting GIF to other format is also not supported. Please contact us if you need any such support.
quality (q)
Sets the output quality of the image. q
is an alias for this parameter. Valid values are between 0
and 100
inclusive of them.
This parameter only takes effect when using jpeg
or webp
as output format
Setting this parameter to 100
will produce the highest quality image. The default value is 85
.
page
If input is a multi-page image like GIF or animated WebP, or PDF file, this parameter will extract a page from the input and convert it to the output format specified.
subsample (chromasub)
Enables or disables chroma subsampling. When it's set to true
t applies 4:2:0
Chroma subsampling. When it's set to false
, it keeps chroma subsampling parameter to 4:4:4
.
Default value is false
.
pngcomp
Specifies compression level for PNG output. This parameter should be between 1
and 9
. Default value is 6
. Value of 9
gives best compression but takes long time to compress.
progressive
Enable/Disable progressive image scan. Default value is True
.
compress
Gumlet automatically converts all JPEG images to progressive image and applies lossless quality optimizations by default.
If you set compress=true
, we further apply lossy optimizations on image which can greatly reduce resultant image size without perceptual loss of quality. As illustrated in the example below, most of the time, it results in a 30-50% reduction in resultant image size with almost no loss in quality.
This feature only works when output is produced in JPEG or PNG format.
compress=true (2.4 MB) | original (3.8 MB) |
---|---|
![]() | ![]() |
dl (Download)
When used in a link, dl
will force the browser to download the image instead of opening it in a new window. Set the value to your desired filename. If no value is set, the downloaded image filename will be identical to the original.