Give the moving element one job
A background and a demonstration have different responsibilities. A background supports the page's mood; a demonstration communicates something visitors need to see. Treating both as an endlessly looping decoration weakens the distinction.
| Placement | A useful job for motion | What must work without it |
|---|---|---|
| Hero background | Establish a quiet atmosphere | Headline, offer, and primary action |
| Product detail | Show a genuine feature or movement | Accurate description and a representative still |
| Instructional panel | Reveal a short sequence of changes | Written steps and readable controls |
Choose one moving focal point per section. If the visitor must watch three unrelated loops to understand the page, reconsider the layout. For product media, inspect every frame for changes to labels, proportions, or features. Generated movement is not evidence of how a physical product behaves.
Desktop · wide crop

Mobile · portrait crop

Make the still state before the animated state
Choose a poster that explains the scene by itself. A dark opening frame, half-finished transition, or empty canvas makes a poor first impression on a slow connection. The poster should feel like a finished design, not a loading placeholder.
Keep headings, prices, instructions, and calls to action in HTML. Words baked into an animation cannot reflow with the page, and visitors may miss information that appears only briefly. Place essential explanations next to the media rather than relying on a final frame.
For an instructional clip, explain important visual actions in nearby text. A player's accessible name identifies the media; it does not tell a visitor which setting changed or what happened next. If motion carries information absent from the poster, provide an equivalent description that can be read at the visitor's own pace. Decorative movement should never be the only sign that a task succeeded.
For predictable camera movement, apply a pan or zoom in a photo or video editor. When you need movement generated inside the scene, use the image animation workspace, then check the result carefully. Neither approach removes the need for a separate poster and a readable page.
Choose the embed, not just the extension
For photographic animated images for websites, a short video is often worth testing because it offers playback controls and can compress efficiently. It is not automatically smaller or faster than every GIF. Compare your actual exports at the same displayed size and acceptable visual quality.
A GIF or animated WebP can be convenient in an image slot, but an ordinary <img> element does not provide native animation playback controls. To let visitors stop a GIF, implement a genuine switch to a still image, or deliver the moving version through a video player. Adding a decorative pause icon does nothing by itself.
Check what your website's media component accepts before exporting. A builder may reject a format, recompress an upload, or remove video attributes. The animated image formats guide explains the broader choices; here, the important question is whether your chosen embed supports the required behavior.
Start with a click-to-play video
This example leaves playback to the visitor. It includes native controls, reserves the media's dimensions, and displays a poster before play. The filenames represent one clip and its matching still; substitute your own published media paths.
<figure>
<video controls playsinline muted preload="none"
width="960" height="540"
poster="/media/guide-photo/window-light-photo-poster.webp"
aria-label="Slow camera movement toward a desk lamp">
<source src="/media/guide-photo/window-light-photo.webm" type="video/webm">
<source src="/media/guide-photo/window-light-photo.mp4" type="video/mp4">
</video>
<figcaption>
A quiet camera movement.
<a href="/media/guide-photo/window-light-photo-poster.webp">View the still image</a>.
</figcaption>
</figure>
Apply max-width: 100%; height: auto; to the video in your stylesheet so it fits a narrower container without distortion. The still-image link sits outside the video element, so it remains available even if a media source cannot play.
preload="none" expresses a loading preference, not a promise that every browser will make identical requests. This example does not autoplay, so a visitor who prefers reduced motion does not receive movement before choosing it.
Design the mobile crop deliberately
A desktop hero may place the subject at the far right to leave room for text. Center-cropping that same composition on a phone can remove the subject entirely. Review the opening frame and the full movement at each intended layout size.
Use an uncropped, contained presentation for demonstrations where every edge matters. A decorative background can tolerate cropping, but keep its focal point clear. If one composition cannot serve both layouts, create a separate mobile version or use the still image there.
Reserve a stable area before the media arrives. The poster and playing clip should share an aspect ratio, and nearby text should not jump when playback starts. Never stretch a wide image into a tall container simply to fill the available space.
Budget the download and the playback
Remove empty lead-in, repeated actions, and unused audio before sacrificing important detail. A concise action is easier to understand and gives the encoder less material to carry. Check the result at its real website size, not only in a full-screen export preview.
Set a project-specific budget for the media, including its poster. Inspect transferred bytes, request timing, and playback on a representative phone. A file's download size is only one part of its cost; decoding and rendering animated frames also consume resources. Do not compare a tiny, blurry GIF with a detailed video and call the difference a format benchmark.
Avoid fetching every off-screen animation immediately. Use your framework or builder's supported loading approach, then verify the published page's requests. web.dev's video performance guidance explains the delivery choices behind this work.
Respect motion preferences without guessing
The prefers-reduced-motion media query tells your site that a visitor has requested reduced motion. It does not automatically stop an animated GIF file. Your implementation must choose the still presentation, avoid starting nonessential motion, and keep deliberate playback available when useful.
For an optional autoplay enhancement, keep the poster and visible playback controls. Muting video does not guarantee autoplay: browser policies and user settings still apply. Handle a failed playback attempt as an ordinary static state, not a broken page. MDN's autoplay guide describes these restrictions.
The WCAG pause, stop, or hide criterion covers moving, blinking, or scrolling information that starts automatically, lasts more than five seconds, and appears alongside other content, unless the movement is essential. A short clip looping indefinitely can exceed that duration. Provide a usable control; moving away from the element should not be the only way to stop it.
Avoid rapid flashes and large, abrupt camera moves. Give controls clear names, visible keyboard focus, and enough contrast to find them against every frame.
Publish after testing the quiet version
Check animated images for websites in these states before launch:
- Before play: the poster, surrounding explanation, and primary action make sense together.
- During play: the subject stays in frame, controls remain readable, and essential text stays stable.
- After pause: visitors can continue reading and resume deliberately.
- With reduced motion: the page starts in a useful still state.
- On a narrow screen or slow connection: layout space is reserved and the media does not hide the main content.
- When the video fails: the still link and written explanation remain available.
Finally, test the live page after your CMS has processed the upload. A preview is not proof of the delivered file or player settings. If the page remains clear when nothing moves, the animation can contribute a specific benefit without becoming a requirement for understanding it.
Sources checked: October 31, 2026.