Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Black and white coversion
Duotone conversion
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Dynamically generate compressed image transformations via URL parameters, presets or URL-based rules
To load fast on any device around the world, images need to be resized, cropped and compressed. No need to push a 20-megapixel image to deliver a 1170px wide thumbnail on a smartphone. DAM will manipulate and transform your images dynamically and optimize for web delivery, thus saving you days in image management.
DAM's image manipulation and transformation features rely on DMO (Dynamic media optimization), a standalone media optimization CDN developed by Scaleflex.
If you do not need storage for your origin (master) images and Digital Asset Management but just on-the-fly image and video transformation + CDN delivery, check-out Cloudimage. Cloudimage is a media proxy pulling your media assets from your origin hosting (web server, S3 bucket, etc.), caching, compressing and delivering them over CDN.
We have documented the most common resizing functions here. If you have any requests for undocumented features, contact us and we will do our best to help.
Everything starts with the basic URL format of a DAM URL:
//token.filerobot.com/folder/filename?operations&filters&watermarks
The hostname token.filerobot.com can be replaced by a custom CNAME. Our Support team can set it up for you.
DAM automatically compresses these images into the most optimal delivery format (WebP, AVIF, ...) based on the user's device and context and accelerates them over multiple Content Delivery Networks from tier 1 CDN providers such as Akamai, Fastly, AWS Cloudfront and CDNetworks.
Resize and crop to achieve the desired width and height
Crops the image to specified dimensions (width and height) while keeping proportions and delivers the resulting image via CDN.
func=crop
This is the default resizing mode when both width and height operations are used. You do not need to specify func=crop explicitly.
Preview | Syntax |
---|---|
Specifies which part of the image you wish to keep while cropping. If you omit the gravity option, central cropping is performed.
gravity=X
Chooses the most important image features and objects and sets the focal point on them when cropping.
gravity=smart
gravity=auto
gravity=face
Sets the crop focal point on the people in the image or on the most prominent featues if no faces are detected. Useful for creating thumbnails from images with different aspect ratios.
Preview | Syntax |
---|
If you prefer to use the legacy automatic crop, just set gravity operation to auto.
Preview | Syntax |
---|
When using gravity=face, all images with one dominant face are focused on this face upon cropping. If there are many or no faces in the image, gravity falls back to auto.
If you would like to try and include multiple faces in the image, you can use gravity=smart
Do not upscale an image if target size is larger than the origin image
Setting crop gravity with focal point coordinates
Allows to crop an image by defining the coordinates of the crop focal point. It is useful when you want to crop images where the coordinates of the point of interest are already known.
To set the coordinates of the focal point, use the gravity=X,Y operation where X and Y are the coordinates of the focal point (in pixels). Alternatively, you can set the coordinates as a percentage of the original image - gravity=Xp,Yp or gravity=xc,yc, where X,Y=0..100 and x,y=0..1.
gravity=X,Y
gravity=Xp,Yp|xc,yc
Original image:
Please note that the focal point in gravity=X,Y has to be defined as coordinates X and Y of the full-sized origin image and not the scaled-down version.
Preview | Syntax |
---|---|
Preview | Syntax |
---|---|
Preview | Syntax |
---|
Preview | Syntax |
---|
token
Your Filerobot token
folder/filename
Here, you can use the full path to the image in your Filerobot container, e.g. demo/part2/image.jpg
operations
Image manipulation operations like width, height, crop, fit, rotate, and trim. For a full list, see .
filters
Use filters like contrast, pixellate, blur, grayscale, and sharpen to apply different effects to your image. All filters can be found in the .
watermarks
Place static or dynamic watermarks on your images, .
Modify brightness, contrast and saturation
Color effects and filters
Resize operation: /docs/paris.jpg?width=400
Resize and convert to grayscale: /docs/paris.jpg?width=400&gray=1
Grayscale thumbnail with a watermark: /docs/paris.jpg?width=400&wat=1&wat_scale=35&wat_gravity=northwest&wat_pad=10&gray=1
northwest
north
northeast
west
center | centre (default)
east
southwest
south
southeast
auto - more info
face - more info
smart - more info
X,Y - more info
Allow upscaling (default): |
Prevent upscaling: |
Crop operation focusing only on one face
Finds the most prominent face in the image and crops it to specified dimension provided with the width and height parameters. If you however provide only one dimension, the other dimension will be chosen automatically to keep the aspect ratio of the face.
func=face
If there is no face in the image or many faces are found, the operation defaults to a standard crop.
Preview | Syntax |
---|---|
Sets margins around the face. You can set equal margins with face_margin=X or separate horizontal and vertical margins (face_margin=W,H).
face_margin=X|W,H
Preview | Syntax |
---|---|
Crop operation which removes faces from the top of the image
Crops out the topmost part of an image if it contains a face.
To control the margin when cropping the face out, you can use the face_margin=Y operation where Y is a percentage of the face height. Its default value is 20. You can also use negative numbers if you would like to keep part of the face.
func=facehide
Preview | Syntax |
---|---|
Resize ignoring proportions
Resize with minimum size constraints (to fill a box)
Resizes an image while bounding the smaller dimension to the desired width or height while keeping proportions. Delivers the resulting image via CDN.
func=boundmin
Please note that the larger dimension of the resized image will be equal or greater than the dimensions set in the URL. If you would like to fit the image to set width and height, you should use either or .
Preview | Syntax |
---|---|
Delivers the optimal size based on device pixel-ratio
Allows you to deliver the right image dimensions according to a defined device pixel ratio. This operation can help with conversion between device-independent pixels and CSS (reference) pixels. Useful in responsive image solutions using the srcset html attribute. Allows positive values limited to 5.
dpr=X
Preview | Syntax |
---|---|
Crop by boundary coordinates
Allows to crop an image by providing the cropping area. It is useful when you want to crop a specific part of the image. To set the coordinates of the crop rectangle, use the tl_px and br_px operations.
tl_px=X1,Y1
br_px=X2,Y2
Original image: /docs/kids.jpg
Positionable crop can be combined with all available resize functions - width/height, crop, fit, bound or cover. This operation is performed after the positionable crop.
Image trimming
Removes any single-color padding around the image if present.
The parameter does not specify the amount of border or frame to trim but rather how aggressive the trim algorithm should be. A bigger value of the parameter (e.g. 25) will trim rather more than not enough. Typical values are between 0 and 10.
This allows you to use the same parameter values for all your images.
trim=X
If the image is resized with the width and/or height commands, the resizing is performed after the border (if present) is trimmed.
Preview | Syntax |
---|
Fits the image in a box with padding when needed
Basic image resizing operations
Resizing operations enable the dynamic generation of image transformations to meet various web delivery use cases. Operations focus on the image size while allow to modify the image itself.
Operation | Syntax | Description |
---|
When you specify both width and height, original image proportions can be either ignored or maintained. Also, you may choose to add padding to the image to fill the blank space.
Filerobot supports the following resize function (operation func).
This resizing function removes parts of the image and is the default behaviour when both width and height are defined. Read further for other resizing functions.
This resizing function may remove parts of the image
Automatic crop or fit based on origin dimensions
Performs either or operation depending on the origin image and the desired transformation dimensions.
If the desired image is smaller than the original, the result is cropped to achieve the desired dimensions.
func=cropfit
Preview | Syntax |
---|
If you include the operation in the URL, the image will be trimmed first (if possible) and then either cropped or fitted to the desired size.
Preview | Syntax |
---|
Apply image effects and adjustments
Colorize the image with an overlay
To create a color overlay by using colorize=X[,Y], where X is the color of the overlay (hex value or color name) and Y is the opacity (Y=0..1
, default 0.5
).
colorize=X[,Y] | colourise=X[,Y]
Preview | Syntax |
---|
Crop by aspect ratio or aspect ratio range.
Sets target aspect ratio or aspect ratio range when cropping. Aspect ratios can be set as decimal values (1.778) or ratios (16:9).
aspect_ratio=AR | ar=AR
aspect_ratio=AR1,AR2 | ar=AR1,AR2
If you provide only one dimension parameter (width or height) and aspect_ratio, the other dimension will be calcualted. If you include both width and height in the URL, aspect_ratio is ignored.
If you provide only aspect_ratio and no dimensions (width or height), the image will be cropped without resizing.
Preview | Syntax |
---|
You can spcify a range of aspect ratio, for example aspect_ratio=4:3,16:9. Images which fall within this range, will not be cropped. Useful to avoid very wide ot very tall images by cropping them to the closest aspect ratio.
Compose image or text layers over the main image
DAM can place a watermark on top of your images if you want to protect them from copying, or tag them with a serial number or custom text. There are three types of watermarks - click on each one for more details.
This is a beta feature, please contact our support to activate it for your token
You can overlay multiple watermarks by indexing the parameters in the URL wat[1]=1&wat[2]=1. The wat=1 parameter must be indexed and contain all watermarks to activate the feature.
All parameters without indices will be applied to all watermarks in the image.
?wat[1]=1&wat[2]=1&wat_scale[1]=50&wat_scale[2]=10&wat_opacity=0.5
In the above fragment, wat_opacity=0.5 will be applied to both watermarks.
Combining multiple watermark types is also possible. Remember that the presense of wat_url=X parameter defines a dynamic watermark, wat_text=X defines a text watermark and the absence of either defines a static watermark.
?wat[1]=1&wat[2]=1&wat[3]=1&wat_url[2]=sample.li/Angular.png&wat_text[3]=text
In the above fragment, there are three watermarks. Watermark 2 is a dynamic watermark, watermark 3 is a text watermark and watermark 1 is a static one.
You can change the compression (output format and quality) of your image by using compression filters. You can use the compression filters alongside and .
By default, Filerobot delivers the images as WebP. If the format is not supported by the client browser, it falls back to JPEG or PNG. If you wish to keep the original format, you can use force_format=original.
You can of course force a specific output format(s). More details can be found in the image formats section.
Supported output image formats
The JPEG compression format is suitable for delivering photographic images with minimal quality loss and high compression rate. You can either choose the compression factor yourself or use Optipress - our Machine Learning based algorithm, which will choose the best way to reduce JPEG file size minimising perceptual quality loss.
Preview | Syntax |
---|
This format is a good choice for non-photographic images - flowcharts, graphs, screenshots, logos, etc. PNG also supports transparency.
While the PNG format offers lossy compression only, Filerobot can optimize the image before compression by reducing the number of colors or adding slight dithering (while preserving edges). This method usually leads to smaller file sizes for images visually indistinguishable from the original ones.
You can activate this feature in the Asset Hub (Settings/Process/Images/Image compression):
WebP is an image format maintained by Google and supported in certain browsers (mainly Chrome, Opera and on Chrome Android) which provides more aggressive compression techniques as JPG without noticeable quality degradation.
By default, automatic WebP transcoding is deactivated. If you choose to activate it, all images will be delivered as WebP. If the client's browser does not support this format, JPEG or PNG (if image has alpha channel) is used instead.
You can use the following parameters to control webp compression quality:
By default, Filerobot delivers the images as WebP, when the format is supported by the browser. If you would like to keep the format of the original image (when possible), you can use force_format=original.
Statically definbed image overlay
This function will watermark selected images with the same watermark - an image set in the Asset Hub. This is useful for placing your company logo, name or other copyright information. If you would like to watermark different images with different watermarks, please refer to the section.
Log in to your DAM and navigate to Settings / DMO -> Images / Watermark and upload your default watermark using the uploader.
To activate the watermark function, you need to include the wat=1 parameter.
The wat_gravity option sets the position of the watermark (available values are east, northeast, north, northwest, west, southwest, south, southeast, and center/centre) and the wat_pad defines the offset of the watermark from the gravity position.
The padding can be defined in pixels (wat_pad=X[,Y]) or in percent of output size (wat_pad=Xp[,Yp]). The padding is applied after scaling the final image and then it is compressed (see Compression) and delivered via CDN.
The watermark can be scaled relative to the original watermark image (wat_scale=X[,Y]) or relative to the output image (wat_scale=Xp[,Yp]).
To keep the watermark-to-image proportions for all image resizes, you should use the wat_scale=Xp[,Yp].
Machine learning based image compression
Different images compressed with the same compression parameters may result in different perceptive quality. Moreover, the same image in different sizes may require different compression strategy to achieve maximum size gain without visible quality loss.
To overcome this, you can use our Optipress JPEG compression algorithm.
Optipress finds out the best JPG compression approach by analysing specific image features and current compression parameters.
A Machine Learning model determines the best compression strategy for this image.
Quality is then evaluated based on a simulation model of the Human Visual System to achieve optimum compression without perceptive quality deterioration.
By using Optipress, you can get the most of the JPEG compression format.
Optipress achieves best results when re-compressing JPEG files and when the image quiality is crucial.
Images created by Optipress fully comply with baseline JPEG specifications and are compatible with all JPEG encoders.
Preview | Syntax |
---|
Preview | Syntax |
---|---|
Preview | Syntax |
---|---|
Do not hesitate to if you need any additional operations not listed above
Keeps image proportions cutting the image to fit the defined width and height; see
Preview | Syntax |
---|
Resizes the image keeping proportions and adding padding to satisfy the desired dimensions; see
Preview | Syntax |
---|
Performs either or based on image dimensions and transformation parameters; see
Preview | Syntax |
---|
Fits image in a box of defined size without adding padding; see
Preview | Syntax |
---|
The boundmin operation is a special case of bound where the smaller dimension is respected instead of the larger one, see
Resizes the image to the given width and height ignoring original image proportions, thus distorting the image; see
Preview | Syntax |
---|
For troubleshooting purposes, use the ci_info=1 operation to view details about resizing and compression, for example:
Preview | Syntax |
---|
Preview | Syntax |
---|
Parameter | Syntax | Description |
---|
Preview | Syntax |
---|
Set format | force_format=webp | forces using the JPEG image compression |
Quality | q=X
| the smaller the value of q, the more your image will be compressed. Be careful - the quality of the image will decrease as well. |
Lossless | lossless=1 | use lossless webp compression |
use watermark | wat=1 | (required) Activates the watermark function |
watermark position | wat_gravity=X
| Defines the position to "anchor" the watermark to |
watermark scaling (relative to original watermark size) | wat_scale=X
| Watermark image scaling defined in in percent of the watermark dimensions |
watermark scaling (relative to output image size) | wat_scale=Xp
| Watermark image scaling defined in in percent of the output image dimensions |
watermark padding | wat_pad=X[p][,Y[p]]
| Adds padding from the anchoring point in pixels (X) or in percent (Xp) |
watermark opacity | wat_opacity=X
| Defines watermark opacity |
gravity | gravity=X
| sets the position of the image in the fit box |
solid background | bg_color=X | bg_colour=X
| defines a background color with a hex code, color name or automatically, based on the image palette |
blurred background | bg_img_fit=1 | sets blurred image background |
bg_blur=X | applies Gaussian blur to the background image |
bg_opacity=X
| specifies background image opacity |
bg_colourise=X | bg_colorize=X | defines a color to tint the background image |
northwest | north | northeast |
west | center | centre (default) | east |
southwest | south | southeast |
width=X | sets the image width to X pixels |
height=X | sets the image height to X pixels |
org_if_sml=1 | prevents resizing if the target size is larger than the origin image |
func=crop | sets crop resize function |
gravity=X | defines the part of the image to be retained when cropping X = [north | south][east | west] | auto | X,Y |
tl_px=X,Y | sets coordinates of the top left corner of the cropping rectangle |
br_px=X,Y | sets coordinates of the bottom right corner of the cropping rectangle |
func=face | crops the image automatically focusing on the most prominent face |
func=fit | sets fit resize function |
func=cropfit | sets crop or fit resize function depending on the origin and the desired dimensions |
func=bound | sets bound resize function |
func=boundmin | bounds the image to the larger dimension |
func=cover | sets cover resize function (distorts image proportions) |
flip=[h][v] | mirrors the image horizontally and/or vertically |
r=X | rotates the image to X degrees (counterclockwise) |
trim=X | trims any solid-color border (if present); X is the aggressiveness of the operation |
radius=X | applies rounded corners and optionally fills the empty background with a color |
Apply the same image watermark to all the images you decide to watermark (e.g. your company's logo). |
Specify the watermark in the DAM URL to apply different watermarks to different images. |
If you need to tag images, use the text watermark to dynamically embed text to the images you need tagged. |
Set format | force_format=jpg | forces using the JPEG image compression |
Quality | q=X
| the smaller the value of q, the more your image will be compressed. Be careful - the quality of the image will decrease as well. |
Optipress | optipress=X
| chooses the best compression approach maintaining visual quality via the Optipress algorithm |
Set format | force_format=png | forces using the PNG image compression |
Standard crop: /docs/business-portfolio.jpg?w=400&h=300
Face crop: /docs/classroom.jpg?h=240&w=380&func=face
Face crop with automatic aspect ratio: /docs/classroom.jpg?h=240&func=face
No dpr parameter (assumed dpr=1): /docs/birds.jpg?w=400
Device pixel ratio 1.75: /docs/birds.jpg?w=400&dpr=1.75
Original image: |
Trimmed image: |
Original image: |
Trimmed image: |
Flip horizontally: |
Flip both horizontally and vertically: |
Original image (650x500 pixels): |
Cropfit to 500x350: |
Original image (400x250 pixels): |
Cropfit to 500x350: |
Original image: |
Cropfit + trim: |
Transparent corners (default, if the formats supports transparency): |
Solid color corners: |
bright=X | f=bright:X | adjusts the brightness of the image |
contrast=X | f=contrast:X | adjusts the contrast of the image |
saturate=X | f=saturate:X | adjusts the saturation of the image |
gray=1 | f=gray | grey=1 | f=grey | converts the image to a black and white one |
colorize=X | colourise=X | applies a color overlay |
pixelate=X | f=pixelate:X | pixellate=X | f=pixellate:X | pixelates the image into X-pixel-sized blocks |
blur=X | f=blur:X | applies Gaussian blur |
sharp=X | f=sharp:X | applies unsharp mask to sharpen the image |
Separate parameters: |
Concatenate into the f parameter: |
Original image: |
Color overlay: |
Desaturate and color overlay: |
Grayscale and color overlay: |
Original image: |
Increased contrast: |
Decreased contrast: |
Original image: |
Increased brightness: |
Decreased brightness: |
Original image: |
Pixelate effect: |
Original image: |
Blur applied: |
use watermark | wat=1 | (required) Activates the watermark function |
watermark URL | wat_url=X | (required) The URL of the watermark image. Can be URL-encoded |
watermark position | wat_gravity=X
| Defines the position to "anchor" the watermark to |
watermark scaling (relative to original watermark size) | wat_scale=X
| Watermark image scaling defined in in percent of the watermark dimensions |
watermark scaling (relative to output image size) | wat_scale=Xp
| Watermark image scaling defined in in percent of the output image dimensions |
watermark padding | wat_pad=X[p][,Y[p]]
| Adds padding from the anchoring point in pixels (X) or in percent (Xp) |
watermark opacity | wat_opacity=X
| Defines watermark opacity |
A modern format suitable for most images. Supports trasnparency and offers both lossy and lossless compression. |
The most popular and widely-supported format. Used by digital cameras. Suitable for photographic images. Lossy compression only. |
Image format with transperency support suitable for raster logos, charts, infographs, etc. Lossless compresison only. |
use watermark | wat=1 | (required) Activates the watermark function |
watermark text | wat_text=X | (required) The text to be overlayed. Can be URL-encoded |
watermark position | wat_gravity=X
| Defines the position to "anchor" the watermark to |
watermark padding | wat_pad=X[p][,Y[p]]
| Adds padding from the anchoring point in pixels (X) or in percent (Xp) |
watermark opacity | wat_opacity=X
| Defines watermark opacity |
watermark font | wat_font=X | Choose the font family for the overlay |
watermark color | wat_color=X | wat_colour=X | Sets the text color |
watermark font size | wat_fontsize=X | wat_fontsize=Xmax | Sets the font size. If the Xmax syntax is used, the size is reduced if the text cannot fit in the image |
Text too long for the image: |
Text size limit set with wat_fontsize=20max: |
optipress=1 | most conservative setting; image quality is prioritised |
optipress=2 | balanced setting |
optipress=3 | most aggressive setting; optimised for smaller file size |
q=85, 543 kB: optipress=3, 347 kB: |
q=85, 246 kB: optipress=3, 150 kB: |
Color saturation correction
To adjust the color saturation, you can use the saturate=X filter and set the desired adjustment value (X= -100..100
). Negative values will decrease color saturation while positive ones will increase it.
saturate=X
Preview | Syntax |
---|---|
Using saturate=-100 will remove all color information and convert the image to grayscale.
Please keep in mind that desaturating an image just discards all color information. If you prefer to create a grayscale image while taking into account human visual system color intensity perception, you should use the gray parameter instead.
Preview | Syntax |
---|---|
Solid background:
Automatic solid background:
Blurred background:
Blurred background, tinted:
650x500 origin image, cropped:
Same parameters, 400x250 origin image:
Original aspect ratio (3:2 or 1.5):
Cropped to 1.8:
Original aspect ratio (1.323):
Cropped to 3:2 (1.5):
Original aspect ratio 1.5:
Aspect ratio range 1.5..2 (no crop needed):
Original aspect ratio 2.25:1 (2.25):
Aspect ratio range 3:2..2:1 (1.5..2):
q=85, filesize 204 kB: q=75, filesize 129 kB: q=65, filesize 102 kB:
Watermark scaled down to 45% of its original size (660px), results in 297px watermark:
Watermark scaled relative to the output image dimensions (540px watermark):
Original image: /docs/frog.png?w=400
Increased saturation: /docs/frog.png?w=400&saturate=35
Desaturation: /docs/frog.png?w=400&saturate=-100
Grayscale: /docs/frog.png?w=400&gray=1
Only resize: /docs/darkside.jpg?w=300
Resize and sharpen: /docs/darkside.jpg?w=300&sharp=3