images — Claude Code rule: what it does, how to install
images directs the AI to embed graphics in Remotion via the Img element, staticFile helper, and dimensions calculation.
no license ★ 849 updated 2026-01-24
.claude/rules/images.mdWhat images does
This instruction set enforces the <Img> component from remotion over regular HTML tags, Next.js elements, or CSS background imagery. It ensures visual assets load completely before rendering starts, keeping video exports free of flickering and blank frames.
The guidance covers referencing assets placed in public/ using staticFile(), pulling remote URLs with CORS enabled, and determining dimensions with getImageDimensions(). It also notes that animated GIF files require <Gif> from @remotion/gif.
Using standard HTML tags in a Remotion project will corrupt the render output, which makes this restriction strictly necessary.
What it helps with
- eliminate blank frames and visual glitches during video rendering
- reference local media from the public directory via staticFile
- calculate asset dimensions dynamically for composition layouts
- handle frame-by-frame image sequences in Remotion code
Example prompts for the agent
- Add our brand logo from the public folder to the Remotion scene
- Build a frame sequence animation that reads images by current frame index
- Measure dimensions of the background banner to compute composition aspect ratio
How to install images
Manually: put the files in place
.claude/rules/images.mdThe paths frontmatter field limits the files
AGENTS.md
Codex reads AGENTS.md: paste the rule text there
Manually: put the files in place
.cursor/rules/images.mdcFrontmatter: description, globs, alwaysApply
Manually: put the files in place
.github/instructions/images.instructions.mdThe applyTo field sets which files it applies to
Manually: put the files in place
.devin/rules/images.mdManually: put the files in place
.clinerules/images.mdStep by step, with commands for each platform: AGENTS.md vs CLAUDE.md: what they are and which one to use
Questions about images
How to install the images rule in Claude Code?
Place the rule file at .claude/rules/images.md in your repository root.
What is the purpose of the images rule?
It guides coding agents to rely on Remotion's dedicated <Img> component instead of standard web images.
Why does the rule disallow native HTML img tags?
Native <img> elements do not wait for assets to finish loading before rendering a frame, which leads to flickering in exported videos.