Overview
Sources
Libraries
Images API

Border Top border-top

Specifies a top border size measured in pixels that will rendered over the image.

border-color parameter is used to set the border color.

Values

This parameter accepts integer values in the range 0 to 500 with 0 disabling top border rendering.

  • 1: specify a top border size of 1 pixel.
  • 500: specify a top border size of 500 pixels.

If no color is specified using parameter border-color a non transparent white color will be used by default.

Examples

Specify a top border size of 40 pixels using border-top=40 without setting any border color:

GET
https://assets.imglab-cdn.net/woman.jpeg?border-top=40
Woman holding a camera with a top border of 40.
x px

Specify a top border size of 40 pixels using lightgray border color with params border-top=40 and border-color=lightgray:

GET
https://assets.imglab-cdn.net/woman.jpeg?border-top=40&border-color=lightgray
Woman holding a camera with a top border of 40 and a lightgray border color.
x px

Specify a top border size of 40 pixels using a transparent gray color with params border-top=40 and border-color=211,211,211,128:

GET
https://assets.imglab-cdn.net/woman.jpeg?border-top=40&border-color=211%2C211%2C211%2C128
Woman holding a camera with a top border of 40 and a semi-transparent border color.
x px

Is possible to specify a border size for all sides with border parameter and set one specific size for border-top using for example border=40 and border-top=80:

GET
https://assets.imglab-cdn.net/woman.jpeg?border=40&border-top=80&border-color=211%2C211%2C211%2C128
Woman holding a camera with a top border of 80, a general border or 40 and using a semi-transparent border color.
x px