Overview
Sources
Libraries
Images API

Padding Left padding-left

Specifies a left padding size measured in pixels that will be added to the image.

Padding will be affected by the value specified by background-color parameter.

Values

This parameter accepts integer values in the range 0 to 500 with 0 disabling left padding.

  • 1: specify a left padding size of 1 pixel.
  • 500: specify a left padding size of 500 pixels.

left padding will be added not increasing size values if specified. In the case that no size is specified padding will be added to the original image size.

Examples

In this example we are specifying a left padding of 40 pixels with padding-left=40 without background-color:

GET
https://assets.imglab-cdn.net/woman-03.jpeg?padding-left=40
Woman posing with a left padding of 40 and a default white background color.
x px

For this example we are applying again a left padding of 40 pixels with padding-left=40 and a black background with background-color=black:

GET
https://assets.imglab-cdn.net/woman-03.jpeg?padding-left=40&background-color=black
Woman posing with a left padding of 40 and a black background color.
x px

Applying the same left padding with padding-left=40 but using an output format with alpha transparency with format=png:

GET
https://assets.imglab-cdn.net/woman-03.jpeg?padding-left=40&format=png
Woman posing with a left padding of 40 and a semi-transparent background color using png as output format.
x px

In this example we set a general padding of 40 pixels with padding=40, a specific left padding of 80 with padding-left=80 and a partial transparent background color with background-color=2B493E80:

GET
https://assets.imglab-cdn.net/woman-03.jpeg?padding=40&padding-left=80&background-color=2B493E80&format=png
Woman posing with a left padding of 80, a general padding of 40 and a semi-transparent background color using png as output format.
x px