Pixta Cloud

Document
Home/Performance/Format/

Format (fm)

The output format to convert the image to.

Valid options are avif, jpg, png, webp, json, blurhash.

Image Formats

AVIF

The AVIF file format supports lossy and lossless image formats. It does support transparency.

The AVIF image format is an image format which supports any image codec. The AVIF image format provides reduction in file size when compared with JPEG, PNG and WebP formats. The advantage of AVIF is that the compression algorithms were originally developed for video in an image format. This allows AVIF image files to be up to 50% lighter than JPEG files and up to 30% lighter than WebP files.

For a list of browsers that support AVIF, please see the AVIF section on developer.mozilla.org If auto=format is set and the browser does not support the AVIF format, we will first fallback to WebP if it is supported. If WebP is not supported, Pixta Cloud will fall back to the source image type or to any format specified by the fm At this time, animated AVIFs are currently not supported in Firefox and any AVIF returned to a Firefox browser will render as a static AVIF.

JPG

JPEG is a lossy format. It does not support transparency or animation.

JPEG is one of the most common formats on the web. It excels at displaying photographs. See the q parameter for controlling the quality of the image.

PNG

The PNG file format is a lossless format. It does support transparency. It does not support animation.

The PNG file format is a common graphics format, often used for application assets.

Note: In most cases, images rendered in Pixta Cloud as JPEGs will use progressive encoding. This is because progressive JPEGs are preferable to baseline JPEGs in terms of size and display speed, though in some cases (such as smaller images), baseline will be better. Depending on the parameters used to render the asset, Pixta Cloud will choose the better of the two options.

WEBP

The WebP file format is a lossy image format, but supports lossless compression. It does support transparency. It does support animation.

WebP can be either a lossless or a lossy image file format. WebP lossless images are 26% smaller in size compared to PNGs. WebP lossy images are 25-34% smaller in size compared to JPEG images.

If auto=format is set and the browser does not support the WebP format, Pixta Cloud will fall back to the source image type or to any format specified by the fm parameter.

Text Formats

JSON

This is a data representation, in text, of the specified image is master version. It includes keys and values relating to the source image DPI, height, width, color profiles, color models, bit depth, and more. The output data varies depending on the input filetype. Here is an example output from a JPEG image:

{
  "format": "jpeg",
  "size": 17235968,
  "width": 6000,
  "height": 4000,
  "space": "srgb",
  "channels": 3,
  "depth": "uchar",
  "density": 350,
  "chromaSubsampling": "4:2:0",
  "isProgressive": false,
  "hasProfile": false,
  "hasAlpha": false,
  "orientation": 8,
  "ImageDescription": "",
  "Make": "SONY",
  "Model": "ILCE-7M3",
  "Orientation": 8,
  "XResolution": 350,
  "YResolution": 350,
  "ResolutionUnit": 2,
  "Software": "ILCE-7M3 v3.00",
  "ModifyDate": 1556557800,
  "YCbCrPositioning": 2,
  "GPSVersionID": [
    2,
    3,
    0,
    0
  ],
  "GPSStatus": "V",
  "GPSMapDatum": "WGS-84",
  "GPSDifferential": 0,
  "ExposureTime": 0.016666666666666666,
  "FNumber": 22,
  "ExposureProgram": 3,
  "ISO": 400,
  "SensitivityType": 2,
  "RecommendedExposureIndex": 400,
  "DateTimeOriginal": 1556557800,
  "CreateDate": 1556557800,
  "undefined": "+09:00",
  "CompressedBitsPerPixel": 5,
  "BrightnessValue": 9.23203125,
  "ExposureCompensation": 0,
  "MaxApertureValue": 1.6953125,
  "MeteringMode": 5,
  "LightSource": 0,
  "Flash": 16,
  "FocalLength": 55,
  "ColorSpace": 1,
  "ExifImageWidth": 6000,
  "ExifImageHeight": 4000,
  "CustomRendered": 0,
  "ExposureMode": 0,
  "WhiteBalance": 0,
  "DigitalZoomRatio": 1,
  "FocalLengthIn35mmFormat": 55,
  "SceneCaptureType": 0,
  "Contrast": 0,
  "Saturation": 0,
  "Sharpness": 0,
  "LensInfo": [
    55,
    55,
    1.8,
    1.8
  ],
  "LensModel": "FE 55mm F1.8 ZA",
  "InteropIndex": "R98"
}

BLURHASH

This will return a text string that can be used to render a small, blurred placeholder image.

quality 30quality 30

Note:fm=blurhash response time increases as the size of the requested image increases. Because small blurred placeholders scale up extremely well, we recommend using image widths in the 30 to 50 pixel range. Simply pass in a w=40 value along with fm=blurhash.