View a markdown version of this page

Overwrite animated status - Dynamic Image Transformation for Amazon CloudFront

Overwrite animated status

This solution assumes that GIF files with multiple pages should be animated. If you’d like to indicate that a GIF should not be animated, or that another file type should be animated, include the animated property in the edits property in the image request.

  • animated (optional, boolean) - Overwrites the initial animated status of the image. If the value is true , the solution will attempt to process the image as animated. For example:

    const imageRequest = JSON.stringify({ bucket: "<myImageBucket>", key: "<myImage.webp>", edits: { animated: true } })

    If it is false, the solution will process the image as a still image. For example:

    const imageRequest = JSON.stringify({ bucket: "<myImageBucket>", key: "<myImage.gif>", edits: { animated: false } })
Note

If an image does not have multiple pages, it will always be processed as still, regardless of the edits.animated property. The following filters are not supported for images that are animated: rotate, smartCrop, roundCrop, and contentModeration.