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

Optimizer disallows animation #65

Open
1 of 3 tasks
samtay opened this issue Aug 14, 2024 · 1 comment
Open
1 of 3 tasks

Optimizer disallows animation #65

samtay opened this issue Aug 14, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@samtay
Copy link

samtay commented Aug 14, 2024

Problem

When manganis optimizes an animated webp/avif/gif file, it appears to strip the animation to a static image.

Steps To Reproduce

Steps to reproduce the behavior:

  • Just use an animated webp: const IMG: &str = manganis::mg!("assets/animated.webp");

Expected behavior

The image should be animated.

Environment:

  • Manganis version: 0.3.0-alpha.1
  • Rust version: [rustc 1.80.1]
  • OS info: Arch Linux
  • App platform: [web, fullstack]

Questionnaire

  • I'm interested in fixing this myself but don't know where to start
  • I would like to fix and I have a solution
  • I don't have time to fix this right now, but maybe later
@ealmloff ealmloff added the bug Something isn't working label Aug 27, 2024
@ealmloff
Copy link
Member

You can explicitly mark an asset as a video with the video function: manganis::mg!(video("assets/animated.webp"))

manganis should try to detect videos automatically from the content. It looks like the image crate has some limited support for frames. If you are interested in working on this, we could skip re-encoding the image if it has more than one frame.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants