Learn how to dynamically replace images in your PowerPoint templates using placeholders.
Replacing Images
You can replace images in your PowerPoint template by using placeholders that reference image URLs or file paths in your data source.
How It Works
- Insert an image placeholder in your PowerPoint template
- Set the image's alternative text (Alt-text) to the placeholder expression
- Provide image URLs or paths in your data source
- During merging, images will be downloaded and inserted into the presentation
Syntax
You can use two syntaxes for image placeholders:
Simple syntax:
- Set Alt-text to:
{{photo_url}}or{{profilePicture}}
Explicit syntax:
- Set Alt-text to:
{{type=image data=profilePicture}}
Both syntaxes work the same way. The explicit syntax allows for future extensions.
Example
Template:
- Insert any image as a placeholder
- Right-click the image → Format Picture → Alt Text
- Set the Description field to:
{{photo_url}}or{{type=image data=photo_url}}
Data:
{
"photo_url": "https://example.com/photos/john-doe.jpg",
"logo_url": "https://example.com/logo.png"
}
Result:
- The placeholder image will be replaced with the image from the URL
Excel Embedded Images
You can also use images embedded directly in Excel cells. When you reference the column containing the embedded image, it will be used in the presentation.
See: Generate project status PowerPoint from Excel with images (Fast & Easy)
Image URL Formats
Images can be referenced using:
- HTTP/HTTPS URLs:
https://example.com/image.jpg - File paths:
/path/to/image.png(for local files) - Data URIs:
data:image/png;base64,...(for embedded images)
Supported Image Formats
- JPEG (
.jpg,.jpeg) - PNG (
.png) - GIF (
.gif) - BMP (
.bmp) - WebP (
.webp)
Image Properties Preserved
The following properties of the placeholder image are preserved:
- Position and size
- Rotation
- Border and effects
- Alignment
Best Practices
1. Use Consistent Image Sizes
If possible, use images with similar dimensions to ensure consistent appearance across slides.
2. Optimize Image URLs
- Use HTTPS URLs for security
- Ensure images are publicly accessible
- Consider image hosting services for better performance
3. Handle Missing Images
If an image URL is invalid or inaccessible:
- The placeholder image may remain
- An error may be logged
- Consider providing fallback images in your template
4. Image Naming
Use descriptive placeholder names:
{{employee_photo}}or{{type=image data=employee_photo}}{{product_image}}or{{type=image data=product_image}}{{company_logo}}or{{type=image data=company_logo}}
Common Use Cases
Employee Photos
{
"name": "John Doe",
"photo": "https://example.com/employees/john-doe.jpg"
}
Product Images
{
"product_name": "Widget A",
"image_url": "https://example.com/products/widget-a.jpg"
}
Company Logos
{
"company": "Acme Corp",
"logo": "https://example.com/logos/acme.png"
}
Set Alt-text to: {{logo}} or {{type=image data=logo}}
Accessing Images from Different Data Sources
From Excel
- Use column header:
{{photo_url}} - Use Excel addressing:
{{xlsx.Sheet1!A1}}(if cell contains image URL) - Embedded images: Reference the column containing the embedded image
From JSON
- Use property name:
{{photo_url}} - Use nested properties:
{{json.profile.photo}} - Use array elements:
{{json.images[0]}}
Troubleshooting
Image Not Loading
- Check URL: Verify the image URL is correct and accessible
- Check Format: Ensure the image format is supported
- Check Permissions: Make sure the image is publicly accessible (not behind authentication)
Image Size Issues
- Too Large: Images may be scaled down to fit the placeholder
- Too Small: Images may be stretched to fill the placeholder
- Aspect Ratio: Original aspect ratio may not be preserved depending on placeholder settings
Performance
- Large images may slow down the merge process
- Consider optimizing images before uploading
- Use appropriate image dimensions for presentations (typically 1920x1080 or smaller)
For more information, see Basic Placeholders.