8000 Support for Animated GIFs · Issue #198 · xemle/home-gallery · GitHub
[go: up one dir, main page]

Skip to content

Support for Animated GIFs #198

Open
Open

Description

@Fusionerr

Currently, animated GIFs are converted to JPG previews, which removes their animation. I’d like Home-Gallery to support animated GIFs natively.

Expected Behavior

Animated GIFs should play automatically in the viewer.

GIFs should scale to fit the viewer size, but when clicked or zoomed, display at their original resolution.

GIFs should loop continuously.

Thumbnails don’t need to animate, though that would be a nice enhancement.

Not mp4
Ideally, GIFs should be kept as GIFs, not converted to MP4. This preserves their ease of use for copy/paste and sharing.

I frequently use GIFs for short clips and memes. Treating them as native GIFs rather than videos keeps file handling simple and allows users to copy or share them directly without having to convert them.

Activity

  1. xemle commented on Nov 2, 2025

    @xemle
    Owner

    Hi @Fusionerr

    thank you for reaching out and providing your input and request.

    Currently an animated GIF is not on the roadmap but you can provide a PR for it. For questions regarding the implementation please reach out at discord

  2. Fusionerr commented on Nov 2, 2025

    @Fusionerr
    Author

    @xemle
    I'm not a developer, but I imagine it might not be too difficult to tell Home-Gallery to skip processing .gif files into flat .jpg previews.
    Could you point me in the right direction for where this conversion happens in the code so I can take a look?

  3. xemle commented on Nov 2, 2025

    @xemle

    The part for generating the preview files is here with the filter to convert them to preview files

    const isSupportedImage = entry => fileExtension(entry.filename).match(/(jpe?g|jpe|png|tiff?|gif|thm|webp|avif)/)

    since gif can be a still image or an animated gif the logic is for me not straight forward. Also I do not know in which sizes such gif should be provided. Does it needs to be scaled

    Since I do not have gifs it is difficult for me to assume the right way. I am a bit lost. Do you have other galleries which do gifs right as kind of blue print? (Still I am working on other stuff but be open for discussions)

  4. Fusionerr commented on Nov 3, 2025

    @Fusionerr
    Author

    Thanks so much for pointing me to that line, I really appreciate it!

    I imagine GIF behavior like on my phone’s Photos app. The thumbnail is a still image, but clicking opens the GIF and it plays automatically. For Home-Gallery, it would be great if GIFs are skipped during preview generation so the original file opens animated, with thumbnails still fine as static images. Scaling can be handled by the browser, showing full size when clicked.

    I believe it’s also possible to distinguish animated GIFs from static ones by checking the frame count, which could be another solution if needed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      0