Fill Generative Position
fill-gen-pos
Premium Feature
Fill Generative Position is currently available for imgix customers on a Premium plan. If you’re interested in this feature, please contact our sales team to get more information on this feature.
The fill-gen-pos
parameter controls where the original image is positioned when using the fit=fill&fill=gen
setting. This allows you to specify where the original content remains in relation to the generative fill, either horizontally or vertically.
- Horizontal Options:
left
,middle
,right
- Vertical Options:
top
,center
,bottom
By combining these values, you can precisely control where the original image is anchored, while the generative fill expands to the remaining area in one direction.
You can specify both horizontal and vertical positioning for generative fill using comma-separated values. The default value will be middle,center
if not explicitly set.
Note that the generative fill will only be added to the side of the image that is not occupied by the original image.
For example, fill-gen-pos=left,top
will place the original image fill to the left or top of the image and add the generative fill to either the right or bottom of the image, depending on the output aspect ratio of the image.
Horizontal Positioning
The middle
, left
, and right
values allow you to specify the starting position of the original image and where generative fill will be added. For example, fill-gen-pos=left
will place the original image fill to the left and add the generative fill to the right of the image.
fill-gen-pos=left
example
Vertical Positioning
The center
, top
, and bottom
values allow you to specify the starting position of the original image and where the generative fill will be added. For example, fill-gen-pos=bottom
will add the image fill to the top and center of the image.