-
Notifications
You must be signed in to change notification settings - Fork 564
word picture add
zmworm edited this page Apr 9, 2026
·
52 revisions
Add an inline or floating image to the document.
Parent: /body or /body/p[N]
| Property | Default | Description |
|---|---|---|
path/src
|
(required) | Image source: local file path, data:image/png;base64,... data URI, or https://... HTTP URL |
width |
6in |
Width (EMU or units: cm, in, pt, px) |
height |
4in |
Height |
alt |
- | Alt text |
anchor |
false |
Floating (vs inline) |
wrap |
- |
none, square, tight, through, topAndBottom, behind, inFront
|
hPosition, vPosition
|
- | Position (EMU) |
hRelative |
- |
margin, page, column
|
vRelative |
- |
margin, page, paragraph
|
behindText |
false |
Floating image appears behind text |
# Add inline image
officecli add report.docx /body --type picture --prop path=chart.png --prop width=5in --prop height=3in --prop alt="Sales Chart"
# Add floating image
officecli add report.docx /body --type picture --prop path=logo.png --prop anchor=true --prop wrap=square --prop width=2in --prop height=1in
# Add image from base64 data URI
officecli add report.docx /body --type picture --prop "path=data:image/png;base64,iVBORw0KGgo..." --prop width=4in --prop height=3in
# Add image from HTTP URL
officecli add report.docx /body --type picture --prop path=https://example.com/chart.png --prop width=5in --prop height=3inNote: Supported image formats: png, jpg, gif, bmp, tiff, emf, wmf, svg. HTTP URLs have a 30s timeout.
Based on OfficeCLI v1.0.40