Remotion Prompt to Motion Graphics supports images in animations through URL references. This guide explains how to include images in your prompts and work with them in the generated code.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/remotion-dev/template-prompt-to-motion-graphics-saas/llms.txt
Use this file to discover all available pages before exploring further.
Image Usage Overview
The generator uses Remotion’s<Img> component to display images. When you reference an image URL in your prompt, the generated code will include the appropriate import and component structure.
Referencing Images in Prompts
Include the full image URL directly in your prompt. The generator will extract it and use it in the code.Basic Image Reference
Example Prompt
Generated Code
Notice how the URL is extracted into an editable constant
IMAGE_URL at the top of the component. This follows the constants-first design principle.Image Hosting Requirements
For images to work in your Remotion animations, they must be:- Publicly accessible - The URL must return the image without authentication
- CORS-enabled - The server must allow cross-origin requests
- Stable - The URL should remain valid (avoid temporary upload services)
Recommended Image Hosts
- GitHub - Raw content URLs from public repos (
https://raw.githubusercontent.com/...) - Cloudinary - Image CDN with transformation support
- Imgur - Direct image links (right-click → “Open image in new tab”)
- Your own CDN - Any server with CORS headers enabled
Common Image Animation Patterns
Product Showcase
Prompt
Floating Logo
Prompt
Image Gallery Slideshow
Prompt
Profile Avatar Animation
Prompt
Customizing Image Display
After generation, you can customize how images appear by editing the constants and styles in the Monaco editor.Change Image URL
Find the constant declaration:Adjust Image Size
Modify the size constants:Add Image Effects
Edit the inline styles on the<Img> component:
Working with Multiple Images
You can reference multiple images in a single prompt. The generator will create separate constants for each:Prompt
Image Format Support
Remotion’s<Img> component supports standard web image formats:
- PNG - Best for logos, graphics with transparency
- JPG/JPEG - Best for photos, complex images
- SVG - Best for scalable vector graphics (use
<Img>not<svg>) - WebP - Modern format with good compression
- GIF - Static GIF rendering (first frame only, not animated)
Troubleshooting Image Issues
Image Not Displaying
- Check the URL - Paste it in a browser to verify it loads
- Check CORS - Open browser DevTools → Network tab, look for CORS errors
- Use direct URLs - Avoid page URLs (like
imgur.com/abc123), use direct image URLs (likei.imgur.com/abc123.png)
CORS Errors
If you seeCORS policy: No 'Access-Control-Allow-Origin' header in the console:
Slow Loading
Large image files can slow down the Remotion preview:- Optimize images - Compress before uploading (use tools like TinyPNG)
- Use appropriate dimensions - Don’t use 4K images for small thumbnails
- Consider WebP - Modern format with better compression than JPG
Advanced: Animated Image Properties
You can animate image properties using Remotion’sinterpolate() and spring() functions:
Fade In Effect
Scale Bounce
Position Animation
Example: Complete Image Animation
Here’s a complete prompt demonstrating best practices:Example Prompt
- ✅ Specific image URL
- ✅ Animation timing details
- ✅ Motion style (elastic spring, fade, slide)
- ✅ Layout description (centered, positions)
- ✅ Visual styling (colors, shadows)
Summary
- Reference images via publicly accessible URLs
- Include URLs directly in your prompt
- Image URLs become editable constants in generated code
- Use CORS-enabled hosts (GitHub, Cloudinary, Imgur)
- Optimize image sizes for faster preview loading
- Describe animation effects in your prompt for automatic generation