# CSS Image Animation Authors: Florian Rivoal, Lea Verou Previous Version: [https://github.com/webplatformco/project-image-animation/blob/main/image-animation-property/README.md](https://github.com/webplatformco/project-image-animation/blob/main/image-animation-property/README.md)
Contents 1. [User Needs \& Use Cases](#user-needs--use-cases) 2. [User Research](#user-research) 1. [Developer \& User signals](#developer--user-signals) 2. [Current Workarounds](#current-workarounds) 3. [Goals](#goals) 1. [Non-goals](#non-goals) 4. [Proposed Solution](#proposed-solution) 1. [Sample Code Snippets](#sample-code-snippets) 2. [Beyond the Basics](#beyond-the-basics) 1. [High-level Solution](#high-level-solution) 1. [Low-level Solution](#low-level-solution) 3. [Possible Extensions](#possible-extensions) 1. [Control Over Iterations](#control-over-iterations) 2. [Longhands And Further Controls](#longhands-and-further-controls) 3. [Control Over the Paused State](#control-over-the-paused-state) 4. [Accessibility Considerations](#accessibility-considerations) 5. [Privacy Considerations](#privacy-considerations) 5. [Complementary Solutions](#complementary-solutions) 1. [Images in the `
## User Needs & Use Cases Animated images (as enabled by GIF, APNG, WebP) are in common use on the web, for a variety of reasons, such as: * Purely decorative design elements * States or transitions of UI elements highlighting various interactions * Part of the content supplied by the author * User-generated content * (animated) image upload can be an explicit feature of the site (social media, image gallery, chat applications…) * (animated) images may be included as a side effect of providing a rich text editor * (animated) images may be received within rich text created in a different service (e.g. email) By default, UAs autoplay these images, which can be jarring for users, especially in use cases where there are multiple images on a single page (e.g. image galleries) and violates [WCAG](https://www.w3.org/WAI/WCAG21/Understanding/pause-stop-hide.html), and currently, site authors have no control over this. This leads to a user desire to control such animations. However, due to the diversity of usage, there is a wide range of use cases and desired UIs and user experiences, so making this an automatic or opt-in UA feature [would not be sufficient](#provide-this-as-a-ua-setting). To offer their users the best experience, websites need to control the playback experience, separately for each different uses of animated images. For example: * Start paused and play on hover and focus * Start paused with a play button and toggle between playing and paused states on click * Autoplay unless `prefers-reduced-motion` is on * Turn off autoplay for decorative images when `prefers-reduced-motion` is on, while keeping animations on for those that are part of UI interactions In some cases, this can already be done using alternatives to animated images, such as CSS animations, SVG, or `