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

Fixes gif downloading when building the archive #430

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

SaptakS
Copy link
Contributor

@SaptakS SaptakS commented Feb 28, 2025

Fixes #421

So seems like X saves the GIFs are video files when uploaded (or added from it's interface) as a part of the post. What actually gets rendered is a MP4 file instead of GIF, which is slightly sad since it would have been nice to save a GIF file for migrations elsewhere. However I have gone ahead and made changes to save the MP4 file created by twitter for the GIF.

This should help in storing the video information instead of just a JPG. I have also added tests and modified the local archive template code to render it correctly.

@micahflee
Copy link
Contributor

I think the reason X converts GIFs to MP4 is so they can use the html

Copy link
Contributor

@micahflee micahflee left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tested this out and it works great!

I only tested with building an archive from scratch, not with importing one, but looking at the code I assume importing from archive should work the same. Did you test from an archive at all?

@micahflee micahflee mentioned this pull request Feb 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Gifs are sometimes downloaded as jpg files (seemingly only the first frame)
2 participants