Skip to main content
rule CX Codex

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

Install into Claude Code · Manually: put the files in place All methods and platforms ↓
.claude/rules/images.md
Open on GitHub

What 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.md

The paths frontmatter field limits the files

Step 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.

Similar IDE rules

All IDE rules for Frontend and UI →

From the same set33

The whole set →
import-srt-captions import-srt-captions — a Claude Code rule for importing .srt subtitle files into Remotion video projects. Uses parseSrt() from @remotion/captions to extract subtitles and integrate them into components. CX Codex +1 ★ 849repo stars 3d 3d enforces proper Three.js and React Three Fiber conventions for deterministic video rendering in Remotion. CX Codex +1 ★ 849repo stars parameters Explains how to add video parameterization using Zod schemas in Remotion compositions. Lets users edit parameters visually in the sidebar instead of hardcoding them. CX Codex +1 ★ 849repo stars sequencing sequencing — a rule for managing component timing in Remotion videos. Uses Sequence for delays and Series for sequential playback, with support for nested and overlapping scenes. CX Codex +1 ★ 849repo stars calculate-metadata The calculate-metadata rule configures Remotion composition metadata before rendering, including duration, dimensions, FPS, props, and the output filename. CX Codex +1 ★ 849repo stars measuring-text measuring-text — a rule to calculate text size, fit fonts to containers, and detect overflow. Use it when building dynamic text in Remotion and need precise dimensions to avoid clipping or wrong scaling. CX Codex +1 ★ 849repo stars fonts Guides Claude Code on loading Google Fonts and local font assets in Remotion video projects without render glitches. CX Codex +1 ★ 849repo stars videos videos — a rule for embedding video in Remotion compositions with trimming, volume control, playback speed, looping and pitch adjustment. Lets you work with video files in animations without repeating boilerplate code. CX Codex +1 ★ 849repo stars

Project sponsors

Companies that keep this analytics open