Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rotate filter (thumbor) does not work with GIF images #460

Closed
6 tasks
T4VincentF opened this issue Mar 30, 2023 · 5 comments · Fixed by #530
Closed
6 tasks

Rotate filter (thumbor) does not work with GIF images #460

T4VincentF opened this issue Mar 30, 2023 · 5 comments · Fixed by #530
Assignees
Labels

Comments

@T4VincentF
Copy link

Describe the bug
When applying the thumbor filter to rotate an image with a gif extension, the image does not rotate. This affects both animated and static gifs.

I didn't see anything mentioned about file extension limitations for the rotate filter on the thumbor docs. https://thumbor.readthedocs.io/en/latest/rotate.html

To Reproduce

  1. apply a thumbor rotate filter to a gif image within the cloudfront URL ( /filters:rotate(90) )
  2. View the image and note it's not rotated

Expected behavior

  1. The image should be rotated by 90 degrees

Please complete the following information about the solution:

  • Version: [v6.1.1]
  • Region: [GLOBAL]
  • Was the solution modified from the version published on this repository? NO
  • If the answer to the previous question was yes, are the changes available on GitHub?
  • Have you checked your [service quotas] - YES , no issue.(https://docs.aws.amazon.com/general/latest/gr/aws_service_limits.html) for the sevices this solution uses?
  • Were there any errors in the CloudWatch Logs? NO

Screenshots
image

Additional context

@T4VincentF T4VincentF added the bug label Mar 30, 2023
@dougtoppin
Copy link
Contributor

@T4VincentF tks for your bug report. we will investigate and reply

@dougtoppin
Copy link
Contributor

@T4VincentF We duplicated the issue and did some investigation. This has been added to our backlog and will be addressed in a future release. thanks for your report.

@T4VincentF
Copy link
Author

@dougtoppin thanks for investigating. Glad I could be of some help.

@simonkrol
Copy link
Member

Hi @T4VincentF,
The next release will contain a change which addresses certain filters not working on static GIFs.

As for multi-page GIFs, while Thumbor supports rotating a multi-page image, all Thumbor-style requests are converted into requests that are passed into the Sharp image processing library.

Though the documentation doesn't seem to indicate any restrictions on rotation, we were only able to get Sharp to support multi-page image rotations of 180 degrees (which you can accomplish by using the flip and flop filters on an image anyway).

To avoid running into errors or unexpected behaviour, we ignore the rotate filter for multi-page GIFs. We'll include an update to the Implementation Guide indicating this restriction alongside the next release.

Thank you for bringing this to our attention,
Simon

@simonkrol
Copy link
Member

Hi @T4VincentF,
With v6.2.5 of the ServerlessImageHandler, the rotate filter should now work for GIF images which are not animated (ie: have a single page). We've also updated the implementation guide to indicate that some filters are ignored for animated images due to restrictions in the underlying libraries.

Thanks for letting us know about your issue,
Simon

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants