GuideReference
TrainingSupportCommunity

Transform images

Add transformations to your image policy to automate processes like cropping, rotating, resizing, and applying visual effects to your images.

Overview

Image and Video Manager automatically applies a default policy named .auto with baseline settings that determine how to generate derivative images unless a request includes a parameter indicating a valid custom policy name.

You can can modify the default policy to select different image transformations, but you can't delete it. The preset values in the policy set the image quality at 85 and width values for derivative images at 720, 1080, 1366, 1920, and 5000 pixels.

Create or update an image policy

  1. Review the information in the Managing processing section to understand the basics about image transformation application and processing.
  2. Use the image policy data source to set up your transformations, building out the data block with the transformation arguments here.
  3. Set the output of the data source to a JSON file or use the output as a variable for the value of the json argument in the policy image resource.

Manage processing

Application of image effects occurs in both initial processing and post-production and on the areas within the break point of an image and outside.

  • List the effects to apply to the image area inside the break point in the transformations argument.
  • Use the post_breakpoint_transformations argument to list the effects to apply to the image area outside the break point.

Use Variables

Many Image and Video Manager arguments let you specify a variable object instead of a string, number, or boolean value.

When using variables, define the variable name in an argument that ends in _var. Use the variable as you would in any other argument.

Organize

Control and organize how to apply image transformations.

ArgumentDescription
compoundGroups an ordered sequence of transformations together as a single transformation.
if_dimensionChooses a transformation depending on the dimensions of the source image. Contains:
  • default. A no-op transformation, by default.
  • dimension. The dimension to use to select the transformation. Value is one of:
    • height
    • width
    • both
    If setting a variable for this argument, use dimension_var instead.
  • equal. The transformation is performed only if the source image's dimension is equal to the value listed.
  • greater_than. The transformation is performed if the source image's dimension is greater than the value listed.
  • less_than. The transformation is performed if the source image's dimension is less than the value listed.
  • value. The value against which to compare the source image dimension. For example, if the image dimension is less than the value, the less_than transformation is applied. If setting a variable for this argument, use value_var instead.
if_orientationChooses a transformation depending on the orientation of the source image. Contains:
  • default. A no-op transformation, by default.
  • landscape. The transformation is performed if the source image uses landscape orientation.
  • portrait. The transformation is performed if the source image uses portrait orientation.
  • square. The transformation is performed if the source image uses a square orientation.
im_queryApplies artistic transformations on a per-image basis by specifying transformations with a query string appended to the image URL. If used, all arguments required. Contains:
  • allowed_transformations. Specifies the transformations you can apply with the query string parameter. Values supported:
    • append
    • blur
    • crop
  • query_var. The variable to use.

Manipulation

Cut or combine elements from multiple images to reduce size, direct focus, or create new images.

  • All transformations are available for use during initial processing.
  • A subset are available for use in post-processing to fine-tune and polish your images post-production.

Append

Use the append block with its child arguments to place a specified image beside the source image by a major dimension first and then on the minor.

Transparent pixels fill any area not covered by either image.

ArgumentRequiredDescription
image✔️The image type. Value is one of:
  • box_image. A rectangular box with a specified fill color and applied transformation. Options:
    • color. A fill color of the box, not the edge of the box. The API supports hexadecimal representation and CSS hexadecimal color values. If setting a variable for this argument, use color_var instead.
    • height. The height of the box in pixels. If setting a variable for this argument, use height_var instead.
    • transformation. The transformation to apply to the box.
    • width. The width of the box in pixels. If setting a variable for this argument, use width_var instead.
  • circle_image. A rectangular box, with a specified color and applied transformation.Contains:
    • color. fill color of the circle. The API supports hexadecimal representation and CSS hexadecimal color values. If setting a variable for this argument, use color_var instead.
    • diameter. The diameter of the circle. The diameter will be the width and the height of the image in pixels. If setting a variable for this argument, use diameter_var instead.
    • transformation. The transformation to apply to the circle.
    • width. The width of the box in pixels. If setting a variable for this argument, use width_var instead.
  • text_image. A snippet of text. Defines font family and size, fill color, as well as outline stroke width and color. Options:
    • fill. The main fill color of the text. If setting a variable for this argument, use fill_var instead.
    • size. The size in pixels to render the text. If setting a variable for this argument, use size_var instead.
    • stroke. color for the outline of the text. If setting a variable for this argument, use stroke_var instead.
    • stroke_size. The thickness in points for the outline of the text. If setting a variable for this argument, use stroke_size_var instead.
    • text. The line of text to render. If setting a variable for this argument, use text_var instead.
    • transformation. The transformation to apply to the text.
    • typeface. The font family to apply to the text image. This may be a URL to a TrueType or WOFF (v1) typeface, or a string that refers to one of the standard built-in browser fonts. If setting a variable for this argument, use typeface_var instead.
  • url_image. An image loaded from a URL. Options:
    • transformation. The transformation to apply to the image.
    • url. The URL of the image. If setting a variable for this argument, use url_var instead.
gravityThe placement of the image relative to the source image. The default centers the image. Value is one of:
  • North
  • South
  • SouthEast
  • SouthWest
  • NorthEast
  • NorthWest
  • SouthEast
  • SouthWest
  • Center
If setting a variable for this argument, use gravity_var instead.
gravity_priorityDetermines the exact placement of the image when gravity is Center or a diagonal direction. Value is one of:
  • horizontal. Appends an image east or west of the source image. This aligns the image on the vertical gravity component, placing Center gravity east.
  • vertical. Appends an image north or south of the source image. This aligns the image on the horizontal gravity component, placing Center gravity south.
If setting a variable for this argument, use gravity_priority_var instead.
preserve_minor_dimensionWhether to preserve the source image's minor dimension. The default is false.
  • false The minor dimension is the dimension opposite to the dimension that the appending image is placed.
  • true something or other
If setting a variable for this argument, use preserve_minor_dimension_var instead.

Aspect crop

Use the aspect block with its child arguments to change the height or width of an image's aspect ratio by either cropping or expanding the area.

All arguments optional.

ArgumentDescription
allow_expansionIncreases the size of the image canvas to achieve the requested aspect ratio instead of cropping the image. If setting a variable for this argument, use allow_expansion_var instead.
heightThe height of the aspect ratio to crop. If setting a variable for this argument, use height_var instead.
widthThe width of the aspect ratio to crop. If setting a variable for this argument, use width_var instead.
x_positionThe horizontal portion of the image you want to keep when applying aspect ratio cropping. If using allow_expansion, this setting defines the horizontal position of the image on the new expanded image canvas. If setting a variable for this argument, use x_position_var instead.
y_positionThe horizontal portion of the image you want to keep when applying aspect ratio cropping. If using allow_expansion, this setting defines the horizontal position of the image on the new expanded image canvas. If setting a variable for this argument, use y_position_var instead.

Crop

Use the crop block with its child arguments to reduce the area of an image.

All arguments optional.

ArgumentDescription
allow_expansionIf cropping an area outside of the existing canvas, expands the image canvas. If setting a variable for this argument, use allow_expansion_var instead.
gravityThe placement of the crop relative to the source image. The available values include eight cardinal directions (North, South, East, West, NorthEast, NorthWest, SouthEast, SouthWest) and Center by default. If setting a variable for this argument, use gravity_var instead.
heightThe number of pixels to crop along the y-axis. If setting a variable for this argument, use height_var instead.
widthThe number of pixels to crop along the x-axis. If setting a variable for this argument, use width_var instead.
x_positionThe x-axis position to crop from. If setting a variable for this argument, use x_position_var instead.
y_positionThe y-axis position to crop from. If setting a variable for this argument, use y_position_var instead.

Face crop

Use the face_crop block with its child arguments to detect faces in the source image and applies the rectangular crop on either the biggest face or all of the faces detected.

Image and Video Manager tries to preserve faces in the image instead of using specified crop coordinates.

All arguments optional.

ArgumentDescription
algorithmSpecifies the type of algorithm used to detect faces in the image: cascade (default) for the cascade classifier algorithm, or dnn for the deep neural network algorithm. If setting a variable for this argument, use algorithm_var instead.
confidenceWith algorithm set to dnn, the minimum confidence needed to detect faces in the image. Values range from 0 to 1 for increased confidence, and possibly fewer faces detected. If setting a variable for this argument, use confidence_var instead.
fail_gravityControls placement of the crop if no faces are detected in the image. Directions are relative to the edges of the image being transformed. The available values represent the eight cardinal directions (North, South, East, West, NorthEast, NorthWest, SouthEast, SouthWest) and Center by default. If setting a variable for this argument, use fail_gravity_var instead.
focusThe focus of the crop rectangle, which is either around biggestFace or allFaces. This is all by default. If setting a variable for this argument, use focus_var instead.
gravityThe placement of the crop relative to the faces, plus padding. The available values represent the eight cardinal directions (North, South, East, West, NorthEast, NorthWest, SouthEast, SouthWest) and Center by default. If setting a variable for this argument, use gravity_var instead.
heightThe height of the output image in pixels relative to the specified style value. If setting a variable for this argument, use height_var instead.
paddingThe padding ratio based on the dimensions of the biggest face detected, This is 0.5 by default. Larger values increase padding. If setting a variable for this argument, use padding_var instead.
styleto crop, or scale a crop area, for the faces detected in the source image. This is zoom by default. The output image is resized to the specified width and height values. A value of crop places a raw crop around the faces relative to the specified gravity value. A value of fill scales the crop area to include as much of the image and faces as possible, relative to the specified width and height values. A value of zoom scales the crop area as small as possible to fit the faces, relative to the specified width and height values. If setting a variable for this argument, use style_var instead.
widthThe width of the output image in pixels relative to the specified style value. If setting a variable for this argument, use width_var instead.

Feature crop

Use the face_crop block with its child arguments to identify prominent features of the source image to crop around relative to the specified width and height values.

All arguments optional.

ArgumentDescription
fail_gravityThe placement of the crop if Image and Video Manager does not detect any features in the image. Directions are relative to the edges of the image being transformed. The available values represent the eight cardinal directions (North, South, East, West, NorthEast, NorthWest, SouthEast, SouthWest) and Center by default. If setting a variable for this argument, use fail_gravity_var instead.
feature_radiusThe size in pixels of the important features to search for. If identified, two features never appear closer together than this value which is 8.0 by default. If setting a variable for this argument, use feature_radius_var instead.
gravityThe placement of the crop relative to the region of interest plus padding. The available values represent the eight cardinal directions (North, South, East, West, NorthEast, NorthWest, SouthEast, SouthWest) and Center by default. If setting a variable for this argument, use gravity_var instead.
heightThe height in pixels of the output image relative to the specified style value. If setting a variable for this argument, use height_var instead.
max_featuresThe maximum number of features to identify as important features. This maximum number of features is 32 by default. The strongest features are always chosen. If setting a variable for this argument, use max_features_var instead.
min_feature_qualityThe minimum quality level of the feature identified. To be considered important, the feature needs to surpass this value. Image and Video Manager measures quality on a scale from 0 (lowest) to 1 (highest). This is 0.1 by default. If setting a variable for this argument, use min_feature_quality_var instead.
paddingAdds space around the region of interest. The amount of padding added is directly related to the size of the bounding box of the selected features. Specifically, the region of interest is expanded in all directions by the largest dimension of the bounding box of the selected features multiplied by this value. If setting a variable for this argument, use padding_var instead.
styleSpecifies how to crop or scale a crop area for the features identified in the source image. This is fill by default. The output image resizes to the specified width and height values. A value of crop performs a raw crop around the features relative to the specified gravity value. A value of fill scales the crop area to include as much of the image and features as possible, relative to the specified width and height values. A value of zoom scales the crop area as small as possible to fit the features, relative to the specified width and height values. If setting a variable for this argument, use style_var instead.
widthThe width in pixels of the output image relative to the specified style value. If setting a variable for this argument, use width_var instead.

Fit and fill

Use the fit_and_fill block with its child arguments to resize an image to fit within a specific size box and use a fill of that same image to cover any transparent space at the edges.

By default, the fill image has a blur transformation with a sigma value of 8 applied. You can use the fill_transformation argument to customize the transformation.

All arguments optional.

ArgumentDescription
fill_transformationUsed to customize the sigma value for the fill image.
heightThe height value of the resized image. If setting a variable for this argument, use height_var instead.
widthThe width value of the resized image. If setting a variable for this argument, use width_var instead.

Mirror

Use the mirror block with its child arguments to flip an image horizontally, vertically, or both.

All arguments optional.

ArgumentDescription
horizontalFlips the image horizontally. If setting a variable for this argument, use horizontal_var instead.
verticalthe image vertically. If setting a variable for this argument, use vertical_var instead.

Region of interest crop

Use the region_of_interest_crop block with its child arguments to crop around a specified area of interest (region) relative to the specified width and height values.

All arguments optional.

ArgumentRequiredDescription
region_of_interest✔️The bounding shape of the important features to search for. Value is one of:
  • circle_shape. Defines a circle with a specified radius from its center point. Contains:
    • center. Required. Defines coordinates for a single point, to help define polygons and rectangles. Each point may be an object with x and y members, or a two-element array.
    • radius. radius of the circle measured in pixels. If setting a variable for this argument, use radius_var instead.
  • point_shape. Defines coordinates for a single point to help define polygons and rectangles. Each point may be an object with x and y members, or a two-element array. Contains:
    • x. horizontal position of the point, measured in pixels. If setting a variable for this argument, use x_var instead.
    • y. The vertical position of the point, measured in pixels. If setting a variable for this argument, use y_var instead.
  • polygon_shape. Defines a polygon from a series of connected points. Contains a required points argument that lists series of point_shape objects. The last and first points connect to close the shape automatically.
  • rectangle_shape. Defines a rectangle's width and height relative to an anchor point at the top left corner. Contains:
    • anchor. Required. The anchor point for the rectangle.
    • height. Extends the rectangle down from the anchor point. If setting a variable for this argument, use height_var instead.
    • width. Extends the rectangle right from the anchor point. If setting a variable for this argument, use width_var instead.
  • union_shape. Identifies a shape based on a combination of other shapes. Contains an array of shapes that form the union.
gravityThe placement of the crop area relative to the specified area of interest. The available values represent the eight cardinal directions (North, South, East, West, NorthEast, NorthWest, SouthEast, SouthWest) and Center by default. If setting a variable for this argument, use gravity_var instead.
heightThe height in pixels of the output image relative to the specified style value. If setting a variable for this argument, use height_var instead.
styleSpecifies how to crop, or scale a crop area, for the specified area of interest in the source image. The output image resizes to the specified width and height values. A value of crop places raw crop around the point of interest, relative to the specified gravity value. A value of fill scales the crop area to include as much of the image and point of interest as possible, relative to the specified width and height values. A value of zoom (the default) scales the crop area as small as possible to fit the point of interest, relative to the specified width and height values. If setting a variable for this argument, use style_var instead.
widthThe width in pixels of the output image relative to the specified style value. If setting a variable for this argument, use width_var instead.

Relative crop

Use the relative_crop block with its child arguments to shrink or expand an image relative to the image's specified dimensions.

  • Transparent pixels fill any area not covered in the expanded areas.
  • Positive values shrink the side.
  • Negative values expand it.

All arguments optional.

ArgumentDescription
eastThe number of pixels to shrink or expand the right side of the image. If setting a variable for this argument, use east_var instead.
northnumber of pixels to shrink or expand the top side of the image. If setting a variable for this argument, use north_var instead.
southThe number of pixels to shrink or expand the bottom side of the image. If setting a variable for this argument, use south_var instead.
westThe number of pixels to shrink or expand the left side of the image. If setting a variable for this argument, use west_var instead.

Resize

Use the resize block with its child arguments to resize an image to an absolute dimension.

This transformation uses the fit aspect preservation mode to select a value for the missing dimension that preserves the image's aspect unless you pass values for height and width.

All arguments optional.

ArgumentDescription
aspectPreserves the aspect ratio. Select fit to make the image fit entirely within the selected width and height. When using fit, the resulting image has the largest possible size for the specified dimensions. Select fill to size the image so it both completely fills the dimensions and has the smallest possible file size. Otherwise ignore changes the original aspect ratio to fit within an arbitrarily shaped rectangle. If setting a variable for this argument, use aspect_var instead.
heightThe height to which to resize the source image. Must be set if width is not specified. If setting a variable for this argument, use height_var instead.
typeThe type of constraints on the image resize. Select normal to resize in all cases, either increasing or decreasing the dimensions. Select downsize to ignore this transformation if the result would be larger than the original. Select upsize to ignore this transformation if the result would be smaller. If setting a variable for this argument, use type_var instead.
widthThe width to which to resize the source image. Must be set if height is not specified. If setting a variable for this argument, use width_var instead.

Rotate

Use the rotate block with the child argument degrees to rotate an image around its center by the given the degrees.

  • Positive values rotate clockwise.
  • Negative values rotate counter-clockwise.

If setting a variable for this argument, use degrees_var instead.

Scale

Use the scale block with its child arguments to change the derivative image's dimensions relative to the original image’s.

All arguments optional.

ArgumentDescription
heightThe scaling factor for the input height that is used to determine the output height of the image. Values between 0 and 1 decrease image height. Values greater than 1 increase the image height. A value of 1 leaves the height unchanged. Image dimensions need to be non-zero positive numbers. If setting a variable for this argument, use height_var instead.
widthThe scaling factor for the input width that is used to determine the output width of the image. Values between 0 and 1 decrease image width. Values greater than 1 increase the image width. A value of 1 leaves the width unchanged. Image dimensions need to be non-zero positive numbers. If setting a variable for this argument, use width_var instead.

Shear

Use the shear block with its child arguments to slant an image into a parallelogram as a percent of the starting dimension in decimal format.

  • Specify at least one axis argument.
  • Transparent pixels fill empty areas around the sheared image as needed. To counter this, use a background_color transformation for these areas.

All arguments optional.

ArgumentDescription
x_shearThe amount to shear along the x-axis, measured in multiples of the image's width. Must be set if y_shear isn't specified. If setting a variable for this argument, use x_shear_var instead.
y_shearThe amount to shear along the y-axis, measured in multiples of the image's height. Must be set if x_shear isn't specified. If setting a variable for this argument, use y_shear_var instead.

Smart crop

Use the smart_crop block with its child arguments to crop around features in an area of interest relative to the given width and height values.

This transformation combines the capabilities of the Face Crop and Feature Crop transformations to automatically detect faces and pronounced features in an image.

  • When Smart Crop finds more than one cace. it crops around them, preserving as many complete faces as possible within the specified dimensions.
  • If it does not find any faces, the crop is around the most prominent feature.

All arguments optional.

ArgumentDescription
debugWhether to execute the transformation. The default is false.
  • false processes the transformation and applies its effects.
  • true does not apply the effect. Instead, it outlines found faces or features in the region of interest and the crop area for testing or verification.
heightThe height in pixels for an image relative to the style value.
sloppyWhether to sacrifice any image fidelity for transformation performance. If setting a variable for this argument, use sloppy_var instead.
styleSpecifies how to crop or scale a crop area for an area of interest in the source image. Value is one of:
  • crop. Crops around the point of interest.
  • fill. Scales the crop area to include as much of the image and point of interest relative to the specified width and height values as possible.
  • zoom. Scales the crop area as close to fit the point of interest relative to the specified width and height values as possible.
widthThe width in pixels for an image relative to the style value.

Trim

Use the trim block with its child arguments to automatically crops the background uniformly from the edges of an image.

All arguments optional.

ArgumentDescription
fuzzThe fuzz tolerance of the trim expressed as a value between 0 and 1. This determines the acceptable amount of background variation before trimming stops. If setting a variable for this argument, use fuzz_var instead.
paddingThe amount of padding in pixels to add to the trimmed image. If setting a variable for this argument, use padding_var instead.

Enhancement

Improve the overall quality of your images.

  • All transformations are available for use during initial processing.
  • A subset are available for use in post-processing to fine-tune and polish your images post-production.

Background color

Use the background_color block with its child argument color to set the hexadecimal CSS color value for the background.

If setting a variable for this argument, use color_var instead.

Blur

Use the blur block with its child argument sigma to apply a Gaussian blur to a given value.

  • The value of sigma scatters original pixels to create the blur effect.
  • The resulting image may be larger than the original as some pixels may scatter outside the image's original dimensions.

If setting a variable for this argument, use sigma_var instead.

Chroma key

Use the chroma_key block with its child arguments to apply a green-screen technique and change any color in an image within the specified volume of the HSL colorspace to transparent or semitransparent.

All arguments optional.

ArgumentDescription
hueThe hue to remove. Enter the degrees of rotation (between 0 and 360) around the color wheel. By default chroma_key removes a green hue which is at 120 degrees on the color wheel. If setting a variable for this argument, use hue_var instead.
hue_featherHow much additional hue to make semi-transparent beyond the hue_tolerance. The default is 0.083 which applies semi-transparency to hues 30 degrees around the Hue Tolerance. If setting a variable for this argument, use hue_feather_var instead.
hue_toleranceHow close a color's hue needs to be to the selected hue for it to be changed to fully transparent. If you enter the maximum value of 1.0 the entire image is made transparent. The default is approximately 0.083 or 8.3% of the color wheel. This value corresponds to 30 degrees around the specified hue. If setting a variable for this argument, use hue_tolerance_var instead.
lightness_featherHow much additional lightness to make semi-transparent beyond the lightness_tolerance. The default value of 0.1 corresponds to 10% away from the tolerated lightness towards full black or full white. If setting a variable for this argument, use lightness_feather_var instead.
lightness_toleranceHow much of the lightest part and darkest part of a color to preserve. You can space this value out from the middle (for example, 0.5 lightness or full color) to help preserve the splash lighting impact in the image. You can define how close the color needs to be to the full color to remove it from your image. The default value of 0.75 means that a color must be within 75% of the full color to full white or full black for full removal. If setting a variable for this argument, use lightness_tolerance_var instead.
saturation_featherHow much additional saturation to make semi-transparent beyond the saturation tolerance. The default is 0.1 which applies semi-transparency to hues 10% below the saturation_tolerance. If setting a variable for this argument, use saturation_feather_var instead.
saturation_toleranceHow close a color's saturation needs to be to full saturation for it to be changed to fully transparent. For example, you can define how green the color needs to be to remove it from your image. The default value of 0.75 means that a color must be within 75% of full saturation in order to be made fully transparent. If setting a variable for this argument, use saturation_tolerance_var instead.

Composite

Use the composite block with its child arguments to apply another image to the source image as an overlay or underlay.

The image underneath is visible in areas that are beyond the edges of the top image or that are less than 100% opaque.

A common use of the overlay composite is to add a watermark.

ArgumentRequiredDescription
image✔️The image type. Value is one of:
  • box_image. A rectangular box with a specified fill color and applied transformation. Options:
    • color. A fill color of the box, not the edge of the box. The API supports hexadecimal representation and CSS hexadecimal color values. If setting a variable for this argument, use color_var instead.
    • height. The height of the box in pixels. If setting a variable for this argument, use height_var instead.
    • transformation. The transformation to apply to the box.
    • width. The width of the box in pixels. If setting a variable for this argument, use width_var instead.
  • circle_image. A rectangular box, with a specified color and applied transformation.Contains:
    • color. fill color of the circle. The API supports hexadecimal representation and CSS hexadecimal color values. If setting a variable for this argument, use color_var instead.
    • diameter. The diameter of the circle. The diameter will be the width and the height of the image in pixels. If setting a variable for this argument, use diameter_var instead.
    • transformation. The transformation to apply to the circle.
    • width. The width of the box in pixels. If setting a variable for this argument, use width_var instead.
  • text_image. A snippet of text. Defines font family and size, fill color, as well as outline stroke width and color. Options:
    • fill. The main fill color of the text. If setting a variable for this argument, use fill_var instead.
    • size. The size in pixels to render the text. If setting a variable for this argument, use size_var instead.
    • stroke. color for the outline of the text. If setting a variable for this argument, use stroke_var instead.
    • stroke_size. The thickness in points for the outline of the text. If setting a variable for this argument, use stroke_size_var instead.
    • text. The line of text to render. If setting a variable for this argument, use text_var instead.
    • transformation. The transformation to apply to the text.
    • typeface. The font family to apply to the text image. This may be a URL to a TrueType or WOFF (v1) typeface, or a string that refers to one of the standard built-in browser fonts. If setting a variable for this argument, use typeface_var instead.
  • url_image. An image loaded from a URL. Options:
    • transformation. The transformation to apply to the image.
    • url. The URL of the image. If setting a variable for this argument, use url_var instead.
gravityThe placement of the image relative to the source image. The available values include eight cardinal directions (North, South, East, West, NorthEast, NorthWest, SouthEast, SouthWest) and Center by default. If setting a variable for this argument, use gravity_var instead.
placementThe placement of the applied image either on top of or underneath the base image. Watermarks are usually applied on top. Backgrounds are usually applied underneath. If setting a variable for this argument, use placement_var instead.
scaleA multiplier to resize the applied image relative to the source image while preserving the aspect ratio (1 by default). Set the scale_dimension to calculate the scale from the source image's width or height. If setting a variable for this argument, use scale_var instead.
scale_dimensionThe dimension, either width or height, of the source image to scale. If setting a variable for this argument, use scale_dimension_var instead.
x_positionThe x-axis position of the image to apply. If setting a variable for this argument, use x_position_var instead.
y_positionThe y-axis position of the image to apply. If setting a variable for this argument, use y_position_var instead.

Contrast

Use the contrast block with its child arguments to adjust contrast and brightness of an image.

All arguments optional.

ArgumentDescription
brightnessThe brightness of the image. Positive values increase brightness and negative values decrease brightness. A value of 1 produces a white image. A value of -1 produces a black image. The default value is 0, which leaves the image unchanged. The acceptable value range is -1.0 to 1.0. Values outside of the acceptable range clamp to this range. If setting a variable for this argument, use brightness_var instead.
contrastThe contrast of the image. Expressed as a range from -1 to 1. Positive values increase contrast, negative values decrease contrast, while 0 leaves the image unchanged. Values outside of the -1 to 1 range clamp to this range. If setting a variable for this argument, use contrast_var instead.

Goop

Use the goop block with its child arguments to distort an image by randomly repositioning a set of control points along a specified grid. The transformed image appears goopy.

Adjust the density of the grid and the degree of randomness. You can use this transformation to create watermarks for use in security.

All arguments optional.

ArgumentDescription
chaosThe greatest distance control points may move from their original position. A value of 1.0 shifts control points over as far as the next one in the original grid. A value of 0.0 leaves the image unchanged. Values under 0.5 work better for subtle distortions, otherwise control points may pass each other and cause a twisting effect. If setting a variable for this argument, use chaos_var instead.
densityThe density of control points used to distort the image. The largest dimension of the input image is divided up to fit this number of control points. A grid of points is extended on the smaller dimension such that each row and column of control points is equidistant from each adjacent row or column. This parameter strongly affects transformation performance. Be careful choosing values above the default if you expect to transform medium to large sized images. If setting a variable for this argument, use density_var instead.
powerBy default, the distortion algorithm relies on inverse squares to calculate distance but this allows you to change the exponent. You shouldn't need to vary the default value of 2.0. If setting a variable for this argument, use power_var instead.
seedYour own seed value as an alternative to the default, which is subject to variability. This allows for reproducible and deterministic distortions. If all parameters are kept equal and a constant seed is used, goop distorts an input image consistently over many transformations. By default, this value is set to the current epoch time measured in milliseconds, which provides inconsistent transformation output. If setting a variable for this argument, use seed_var instead.

Grayscale

Use the grayscale block with its child argument type to restrict image color to shades of gray. The default value for type is Rec709. Supported values:

  • Brightness
  • Lightness
  • Rec601
  • Rec709

If setting a variable for this argument, use type_var instead.

HSL

Use the hsl block with its child arguments to adjust the hue, saturation, and lightness (HSL) of an image.

Notes:

  • HSL and HSV are similar. Where HSL's lightness attribute controls the vibrancy of a color, HSV's value attribute darkens a color.

  • Other transformations can also affect color, such as grayscale and max_colors.

If you're using more than one of these transformations, consider the order of application for the desired results as the provided order is the processing order.

All arguments optional.

ArgumentDescription
hueThe number of degrees to rotate colors around the color wheel. The default is 0. If setting a variable for this argument, use hue_var instead.
lightnessA multiplier to adjust the lightness of colors in the image. Note that lightness is distinct from brightness. For example, reducing the lightness of a light green might give you a lime green whereas reducing the brightness of a light green might give you a darker shade of the same green. Values less than 1.0 decrease the lightness of colors in the image. Values greater than 1.0 increase the lightness of colors in the image. If setting a variable for this argument, use lightness_var instead.
saturationA multiplier to adjust the saturation of colors in the image. Values less than 1.0 decrease saturation and values greater than 1.0 increase the saturation. A value of 0.0 removes all color from the image. If setting a variable for this argument, use saturation_var instead.

HSV

Use the hsv block with its child arguments to adjust the hue, saturation, and value (HSV) of an image.

Notes:

  • HSL and HSV are similar. Where HSL's lightness attribute controls the vibrancy of a color, HSV's value attribute darkens a color.

  • Other transformations can also affect color, such as grayscale and max_colors.

All arguments optional.

ArgumentDescription
hueThe number of degrees to rotate colors around the color wheel. This is 0.0 by default. If setting a variable for this argument, use hue_var instead.
saturationA multiplier to adjust the saturation of colors in the image. Values less than 1.0 decrease saturation and values greater than 1.0 increase the saturation. A value of 0.0 removes all color from the image. If setting a variable for this argument, use saturation_var instead.
valueA multiplier to adjust the lightness or darkness of the image's base color. Values less than 1.0 decrease the base colors in the image, making them appear darker. Values greater than 1.0 increase the base colors in the image, making them appear lighter. If setting a variable for this argument, use value_var instead.

Max colors

Use the max_colors block with its child argument colors to set the maximum number of colors in an image’s palette. The fewer colors used, the smaller the file size.

If setting a variable for this argument, use colors_var instead.

Mono hue

Use the mono_hue block with its child argument hue to set all hues in an image to a single hue represented by its number on the color wheel, 0-360.

Mono hue maintains the original color’s lightness and saturation but sets the hue to that of the specified value. This has the effect of making the image various shades of the specified hue.

If setting a variable for this argument, use hue_var instead.

Opacity

The opacity argument sets the level of transparency for an image represented as a value on a scale of 0 to 1.

  • An image with no transparency is opaque.
  • Values below 1 decrease opacity.
  • A value of 0 makes an image completely transparent.

If setting a variable for this argument, use opacity_var instead.

Remove color

Use the remove_color block with its child arguments to remove a specified color from an image and replace it with transparent pixels.

All arguments optional.

ArgumentDescription
colorThe hexadecimal CSS color value to remove. If setting a variable for this argument, use color_var.
featherUsed to minimize any hard edges and to make the color removal more gradual in appearance. This option allows you to extend the color removal beyond the specified tolerance. The pixels in this extended tolerance become semi-transparent which creates a softer edge. The first time there’s a real-time request for an image, this option may result in a slow transformation time, but subsequent requests aren't impacted as the transformed image is served directly from the cache. If setting a variable for this argument, use feather_var instead.
tolerancehow close the color needs to be to the selected color before it's changed to fully transparent. Set to 0.0 to remove only the exact color specified. If setting a variable for this argument, use tolerance_var instead.

Unsharp mask

Use the unsharp_mask block with its child arguments to emphasize edges and details in source images without distorting the colors.

Although this effect is often referred to as sharpening an image, it actually creates a blurred, inverted copy of the image known as an unsharp mask. Image and Video Manager combines the unsharp mask with the source image to create an image that is perceived by the human eye as clearer.

All arguments optional.

ArgumentDescription
gainHow much emphasis the filter applies to details. Higher values increase apparent sharpness of details. If setting a variable for this argument, use gain_var instead.
sigmaThe standard deviation of the Gaussian distribution used in the unsharp mask, measured in pixels. This is 1.0 by default. High values emphasize large details and low values emphasize small details. If setting a variable for this argument, use sigma_var instead.
thresholdThe minimum change required to include a detail in the filter. Higher values discard more changes. If setting a variable for this argument, use threshold_var instead.

See also

For more information about the available image transformations, see Add image transformations and conditions.