Skip to main content
Skip table of contents

Format options

Image file format (fmt)

The image format option allows to specify the desired output image format.

For example: fmt=png selects PNG as the save option.

https://fx.images.drivecommerce.com/api/v1/drive/image/dog?fmt=png

https://fx.images.drivecommerce.com/api/v1/drive/image/dog?fmt=webp-auto

If not specified, the image server will default to 32-bit PNG image format.

Supported file formats options include:

Option

Description

png

Saves output image in 24-bit PNG format without alpha (transparency) channel.

png-alpha

Saves output image in 32-bit PNG format with transparency channel.

jpg

or

jpeg

Saves output image in JPEG file format.

See qlt parameter to select the desired output image quality.

webp

Saves image as a WebP image file using lossy image compression.

Using Lossy WebP can be a great alternative to classic JPEG image compression, with up to 30% better image compression ratio and wide browser support. Unlike JPEG, WebP images support transparency channel.

WebP images support variable compression quality specified using qlt parameter.

webp-auto

Special image format parameter value. If the user browser supports WebP image format, the image server will generate image using WebP compression, and will default to JPEG otherwise.

webplossless

Save image as a WebP image file using lossless image compression.

Lossless WebP format is a great alternative to PNG images, providing better compression even when using transparency.

WebP images support variable compression quality specified using qlt parameter.

webplossless-auto

Special image format parameter value. If the user browser supports WebP image format, the image server will generate image using WebP compression, and will default to 32-bit PNG otherwise.

tiff

Save output image using TIFF image format.

See as, dpi, and icc parameters to generate TIFF images using sRGB or CMYK colorspace.

While TIFF image compression is always lossless, when specifying value 100 using qlt parameter, the resulting TIFF image will use no internal compression method. Other parameter values will trigger DEFLATE compression method.

rasterpdf

The output image will be rasterized and embedded in a PDF file.

Special image formats

Some output image formats have special considerations, and typically are used to generate a production-ready file using specific requirements.

Option

Description

rasterpdf

The output image will be rasterized and embedded in a PDF file.

svg

The output image is outputted as an SVG file.

SVG output requires special considerations when rendering. For example, only vector images and text are allowed as source images for layers

ai3

Generate output file as an Illustrator 3.0 output file.

Primarily targeted for the Laser Engraving machines with software that supports only Illustrator 3.0 as design files.

ai3-flatten

Similar to ai3 option, however the design is “flattened” prior to saving. This removes any overlapping areas and ensures that every part of the design is engraved only once.

Quality (qlt)

Specify output image file quality. The parameter value should be a number between 0 (lowest quality) and 100 (highest quality).

For example: qlt=100

https://fx.images.drivecommerce.com/api/v1/drive/image/dog?fmt=webp-auto&qlt=10

Print resolution (dpi)

Specify output image file print resolution, dots-per-inch. If not specified and the file format requires the value, an error will be generated.

For example: dpi=300

Colorspace (as)

Allows to select a colorspace of the output image.

Allowed values:

  • srgb Selects sRGB color space. This is the default option.

  • cmyk Selects CMYK color space.

ICC profile (icc)

Provides a name of the ICC provide to be used for color conversions. An ICC profile is required when rendering images using CMYK colorspace.

The ICC profile parameter should be a name of a file that is uploaded to the customer’s image storage.

For example: icc=printer.icc

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.