Output control includes manipulating image format and quality. A good combination of those provides your web or mobile app with better loading times thus improving conversions and SEO ranking.
Converts an image to one of the following formats:
jpeg— JPEG is a lossy image format (good compression, good for photos). JPEG doesn’t support an alpha channel, hence you can use the setfill operation that sets a background color. All browsers support JPEG.
png— PNG is a lossless format (good compression only for graphics) with alpha channel support. Supported by all browsers.
webp— WebP is a modern image format that supports alpha channel and lossy compression. The format is good for all kinds of images but supported by a limited number of browsers.
auto— the image format used for content delivery is set according to the presence of an alpha channel in your input and capabilities of a client.
Technically, the default behavior of
auto is about always trying to deliver WebP images based on checking the
Accept header. We do it if a client supports the
image/webp MIME-type and you are running the default Uploadcare setup with our storage and the default CDN domain,
Transparent, size is equal
to the opaque one.
-/format/auto/, there is another way to control which image format is delivered to a client. In HTML 5, you can force the browser to automatically choose a WebP image version over others. This is done by using
<picture>. Simply, wrap your
<img> element with
<picture> and add
<source> having its type set to
type="image/webp". Compatible browsers will then automatically load the WebP image version; others will take either JPEG or PNG.
<source srcset="//ucarecdn.com/:uuid/:operations/-/format/webp/" type="image/webp">
Sets the level of image quality that affects file sizes and hence loading speeds and volumes of generated traffic.
quality works with JPEG and WebP images.
When your input and output are both JPEGs and no destructive operations are applied, your output image quality is limited to the initial input quality: when you upload a highly compressed image, you can use the
normal setting or go even higher, but it will not affect neither your compression settings nor file size.
normal— the default setting, suits most cases.
better— can be used to render relatively small and detailed previews. ≈125% file size compared to
best— useful for hi-res images, when you want to get perfect quality without paying much attention to file sizes. ≈170% file size.
lighter— useful when applied to relatively large images to save traffic without significant losses in quality. ≈80% file size.
lightest— useful for retina resolutions, when you don’t have to worry about the quality of each pixel. ≈50% file size.
Blurry on retina.
Fits all screens.
Perfect for retina.
Returns a progressive image. In progressive images, data are compressed in multiple passes of progressively higher detail. This is ideal for large images that will be displayed while downloading over a slow connection allowing a reasonable preview after receiving only a portion of the data. The operation does not affect non-JPEG images; does not force image formats to