Image sequences

Turn a folder of frames into a sequence that plays as the visitor scrolls, held on screen if you want, with a still frame for reduced motion.

Updated

An image sequence is a set of frames, such as a product turning or a building rising, drawn one at a time as the page scrolls. It takes two pieces: the Image sequence element, which holds the frames, and the Image sequence on scroll scene, which ties the frames to the scroll. This page goes from a folder of frames to a published sequence.

Before you start #

  • You need the Content editor or Super admin role.
  • Prepare the frames as JPEG, PNG, GIF or WebP files, all the same size, named so that their order sorts by name: frame-1.webp … frame-72.webp works, because the order is natural (frame-2 comes before frame-10).
  • Keep the count and the weight down. A sequence draws at most 240 frames, and every frame is downloaded by every visitor who opens the page. As a reference, the Libretto landing uses 72 frames at 1280×800 in WebP, under 45 KB each.
  • Put the frames in one .zip file, without folders inside it.

Upload the frames #

  1. In the site's sidebar, open Media.
  2. Choose Upload files, or drop the .zip on the page. A zip of images becomes a folder named after the zip, with the images in file-name order.
  3. Wait for Uploaded in the uploads list.

The zip may hold up to 300 images, and the whole file up to 200 MB. Each image inside has the same 5 MB limit as a single upload: one larger image stops the whole zip. Anything that is not a JPEG, PNG, GIF or WebP image (folders, __MACOSX files, dotfiles, SVGs, PDFs) is left out, and the list says "… entries of … are not images and were left out".

Add the sequence to the page #

  1. Open the page in the editor. In Layers, choose Insert with a section selected, or Add section for a new section.
  2. In the Add panel, search for "Image sequence" and choose Image sequence.
  3. In the inspector, fill Alternative text: what the sequence shows, for visitors who cannot see it. It is required.
  4. Under Frames, add the frames. In the media picker, choose the folder in Folder, then Select all in this folder, then Select …. The frames are added in file-name order.
  5. Set Fit: Fill crops the frames' edges to fill the element (the default), Whole shows every frame entire.
  6. Give the element its size and proportions in the Styles tab, like any other element.

Until there is a scene, the element shows its first frame and does not move.

Make it play on scroll #

  1. With the image sequence selected, open Motion, choose Add a scene, then Image sequence on scroll.
  2. Set the knobs:
KnobWhat it means
Starts afterWhen the first frame starts to change, in screens. 0: when the sequence reaches the top of the screen. -1: when it comes in from below.
Ends afterWhen the last frame is reached, in screens counted the same way. It is always at least a quarter screen after the start.
Held on screen while it playsYes pins the sequence in place while the frames run, then lets it scroll away. No lets it scroll with the page.
  1. Scrub it with the slider in the preview's Motion bar to check the whole run.

A longer range plays the frames more slowly. With Held on screen while it plays on Yes, the range is also how long the sequence stays pinned, so 2 screens means the visitor scrolls two screen heights through it.

Frames from an address pattern (advanced) #

If the frames are hosted at numbered addresses, open the advanced fields instead of listing them:

  • Frame address pattern: the address with {n} where the number goes, such as /media/turn/frame-{n}.webp.
  • Number of frames: 2 to 240.
  • First frame number: the number of the first frame.
  • Digits in the number: 3 writes 007; 0 writes the number as it is.

Pattern frames come after any frames listed under Frames, and the total is cut at 240.

What you see #

  • Before the page's scripts run, and for visitors without JavaScript, the first frame shows as a normal image with its alternative text.
  • Once the frames start loading, a canvas takes the image's place and draws the frame that matches the scroll. The frames load first and last, then the frames in between, a few at a time; until a frame has arrived, the nearest loaded one stands in.
  • Visitors with reduced motion see the last frame, still. Tick Reduce motion in the preview's Motion bar to check it.

Pitfalls #

Pitfall: An empty Alternative text blocks the publish: it is a required field. Describe what happens in the sequence ("The chair turns a full circle"), not "animation".

  • Every frame starts downloading as soon as the page opens, not when the visitor reaches the sequence. A heavy sequence slows the whole page on mobile. Check Motion load in the top bar and test on a phone-sized preview.
  • Frames picked by hand are added in the order you pick them. Use Select all in this folder to keep the file-name order.
  • Frames of different sizes jump as they play. Export them all at the same size and crop.
  • With Fit on Fill, the frames' edges are cut when the element's proportions differ from the frames'. Set the element's ratio to the frames' ratio, or use Whole.
  • In the Edit preview mode some blocks hold still. Switch Preview mode to Live to see the pinning as a visitor will: in Edit the sequence still plays as you scroll, but nothing is pinned.

Something wrong on this page? Write to docs@librettocms.com.

Libretto docs

Colophon. These docs are a Libretto site: 68 pages in two languages, 20 guide pages imported from Markdown and 41 reference pages generated from the operation registry. Set in Softcore, with code in IBM Plex Mono. Its outline:

/ Libretto docs /start Get started /start/request-access Request access /start/workspace Your workspace /start/first-site Your first site /start/invite-a-client Invite a client /start/connect-claude Connect Claude to Libretto /build Build /build/first-page Build a page /build/layers-and-canvas Layers and canvas /build/site-components Site components /design-system Design system /design-system/tokens Colours, space and themes /design-system/components Components and variants /design-system/fonts Typography and fonts /motion Motion /motion/scenes Scenes and recipes /motion/image-sequences Image sequences /motion/reduced-motion Reduced motion /publish Publish /publish/languages Site languages /publish/versions Publish and versions /publish/members-and-forms Members and forms /publish/domains Domains /handover Hand a site to a client /glossary Glossary /agents Agents and API /agents/mcp MCP server /agents/cli CLI /agents/batches Batches /agents/errors Errors and findings /agents/operations Operations /search Search