Overview
Sources
Libraries
Images API

Face Padding face-padding

Specifies a padding scale that will be added to faces when mode=face is used.

Values

This parameter accepts float values in the range 1.0 to 20.0 with 1.0 disabling face padding.

  • 1.0: specify an empty padding.
  • 20.0: specify a padding equal to 20.0 times the face area.

Face padding will be limited by image size. Applying a bigger face padding when image limits are reached will not have any effect.

Examples

If no face-padding is specified the image will be resized to fit the detected faces area:

GET
https://assets.imglab-cdn.net/couple-02.jpeg?width=900&height=600&mode=face
Female couple image resized using face mode without face-padding parameter.
x px

In this example we are applying a face-padding of 3.0 with face-padding=3.0 increasing the padding over the detected faces:

GET
https://assets.imglab-cdn.net/couple-02.jpeg?width=900&height=600&mode=face&face-padding=3.0
Female couple image resized using face mode and a face-padding of 3.
x px