-
Notifications
You must be signed in to change notification settings - Fork 529
ppt picture add
zmworm edited this page Apr 18, 2026
·
53 revisions
Insert images on a slide with positioning and alt text.
Path: /slide[N] (parent)
| Property | Default | Description |
|---|---|---|
path |
(required) | Image source: local file path, data:image/png;base64,... data URI, or https://... HTTP URL |
name |
Picture {N} |
Picture name |
alt |
filename | Alt text for accessibility |
width |
6in |
Width (EMU or units). If only width is supplied, height is auto-computed from the image's native aspect ratio. |
height |
4in |
Height (EMU or units). If only height is supplied, width is auto-computed from the image's native aspect ratio. |
x / left
|
centered | Left position (EMU or units) |
y / top
|
centered | Top position (EMU or units) |
geometry / shape
|
rect |
Clip shape geometry (e.g., roundRect, ellipse, heart) |
fallback |
×ばつ1 transparent PNG | Raster fallback image for SVG (used by older Office versions) |
# Add a picture with size officecli add slides.pptx /slide[1] --type picture --prop src=photo.jpg --prop width=8in --prop height=5in --prop alt="Team photo" # Add logo at specific position officecli add slides.pptx /slide[1] --type picture --prop src=logo.png --prop x=20cm --prop y=16cm --prop width=3cm --prop height=1cm # Add named picture officecli add slides.pptx /slide[1] --type picture --prop src=/tmp/chart.png --prop name="Chart Screenshot" --prop x=2cm --prop y=4cm --prop width=20cm --prop height=12cm # Add picture clipped to a circle officecli add slides.pptx /slide[1] --type picture --prop src=avatar.jpg --prop geometry=ellipse --prop width=5cm --prop height=5cm # Add picture clipped to rounded rectangle officecli add slides.pptx /slide[1] --type picture --prop src=photo.jpg --prop shape=roundRect --prop width=10cm --prop height=8cm # Add picture from base64 data URI officecli add slides.pptx /slide[1] --type picture --prop "path=data:image/png;base64,iVBORw0KGgo..." --prop width=10cm --prop height=8cm # Add picture from HTTP URL officecli add slides.pptx /slide[1] --type picture --prop src=https://example.com/logo.png --prop width=5cm --prop height=5cm
officecli add slides.pptx /slide[1] --type picture --prop src=diagram.svg --prop width=10cm --prop height=8cm
officecli add slides.pptx /slide[1] --type picture --prop src=icon.svg --prop fallback=icon.png --prop width=3cm --prop height=3cm
×ばつ1 transparent pixel unless `fallback` is specified). --- *Based on OfficeCLI v1.0.52*">
> **Note:** Supported image formats: png, jpg, gif, bmp, tiff, emf, wmf, svg. HTTP URLs have a 30s timeout. SVG images use OOXML dual representation: modern Office (2016+) renders the SVG; older versions fall back to a PNG (auto-generated ×ばつ1 transparent pixel unless `fallback` is specified).
---
*Based on OfficeCLI v1.0.52*