Skip to content

Fixes gif downloading when building the archive#430

Merged
micahflee merged 2 commits intomainfrom
421-fix-gif-downloading
Mar 4, 2025
Merged

Fixes gif downloading when building the archive#430
micahflee merged 2 commits intomainfrom
421-fix-gif-downloading

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
Member

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

Copy link
Member

@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
@micahflee micahflee merged commit 9e065d4 into main Mar 4, 2025
1 check passed
@micahflee micahflee deleted the 421-fix-gif-downloading branch March 4, 2025 00:48
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