Skip to content

Interface: ImageFillProps ​

Native PPTX picture (image) fill — fills a shape's interior with a bitmap (<a:blipFill>). Provide exactly one of path or data; raster formats only (PNG/JPEG/GIF/BMP/WebP). SVG is not yet supported as a fill source.

Properties ​

crop? ​

optional crop?: object

Crop the source image to a sub-region by percentage edge insets, emitted as DrawingML <a:srcRect>.

  • each value is the percent (0–100) trimmed from that edge of the source image
  • l + r and t + b must each be less than 100
  • omitted edges default to 0

This is the source-image crop used by native Shape picture fills. The remaining region is stretched to fill the shape's bounding box and then clipped by the shape geometry.

b? ​

optional b?: number

Percent trimmed from the bottom edge of the source image.

Default ​
ts
0

l? ​

optional l?: number

Percent trimmed from the left edge of the source image.

Default ​
ts
0

r? ​

optional r?: number

Percent trimmed from the right edge of the source image.

Default ​
ts
0

t? ​

optional t?: number

Percent trimmed from the top edge of the source image.

Default ​
ts
0

data? ​

optional data?: string

Pre-encoded base64 data URI, e.g. 'image/png;base64,iVBOR...'.


path? ​

optional path?: string

Image file path (Node filesystem path or URL).