Skip to content

Allow user to set sharp's animated option #456

Closed
@sskylar

Description

@sskylar

Right now sharp's animated option is turned on automatically if contentType is GIF:
https://github.com/aws-solutions/serverless-image-handler/blob/182641250578bf2b921034e8d4b061ca5f5e96ce/source/image-handler/image-handler.ts#L78

This should be user customizable.

Use cases:

  • Removing animation from GIF (animated: false)
  • Enabling animation for other formats such as WebP (animated: true)

Animated WebP files are supported by sharp (example), but this setting is preventing it from working.

Solution:

  • Keep the current default, but allow user to optionally set/override animated to their preference (true or false).

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions