Skip to content

Fill Parameters

fill

The fill parameter determines the method used to fill any empty areas in an image. It is used when the fit parameter is set to fill or fillmax.

fill_color

fill_color specifies the colour to be used for filling empty areas in the image.

Type: string (color value)
Default: white

Usage

Basic Fill

image.jpg?w=400&h=300&fit=fill&fill_color=blue
Fill empty areas with blue color.

Hex Color Fill

image.jpg?w=500&h=400&fit=fill&fill_color=#F0F0F0
Fill with light gray background.

Transparent Fill

image.jpg?w=300&h=300&fit=fill&fill_color=transparent
Leave empty areas transparent (PNG output recommended).

Fill Without Upscaling

image.jpg?w=1200&h=800&fit=fillmax&fill_color=#000000
Downscales where necessary, then pads with black without enlarging the source image.

Use Cases

  • Social Media: Create consistent aspect ratios for posts
  • Product Images: Uniform backgrounds for e-commerce
  • Thumbnails: Consistent sizing without distortion
  • Print Layout: Fill to exact dimensions for design layouts

Examples

E-commerce Product

product.jpg?w=500&h=500&fit=fill&fill_color=white

Social Media Post

post.jpg?w=1080&h=1080&fit=fill&fill_color=#F8F8F8
photo.jpg?w=800&h=600&fit=fill&fill_color=black