google / docsy

A set of Hugo doc templates for launching open source content.
https://docsy.dev
Apache License 2.0
2.6k stars 897 forks source link

Feature request: support gif as featured-background #817

Closed spacefan closed 1 year ago

spacefan commented 2 years ago

Is there possible to let docsy support gif format of featured-background?

LisaFC commented 2 years ago

You should be able to use a .gif as your featured-background, yes - Hugo's image processor supports bmp, gif, jpeg, jpg, png, tif, tiff, and webp

Let me know if it doesn't work and I'll do some experimenting.

spacefan commented 2 years ago

Yes, it doesn't work. When i use featured-background.gif, the animation cannot be played.

LisaFC commented 2 years ago

Ah right - the image processor (which we use for resizing etc.) doesn't currently support animated gifs. There's an open issue for Hugo here: https://github.com/gohugoio/hugo/issues/5030

(one comment on the issue suggests that animated PNG files might work, if you convert your file?)

spacefan commented 2 years ago

Ah right - the image processor (which we use for resizing etc.) doesn't currently support animated gifs. There's an open issue for Hugo here: gohugoio/hugo#5030

(one comment on the issue suggests that animated PNG files might work, if you convert your file?)

APNG unfunctional

LisaFC commented 2 years ago

Right, I wasn't sure if it would work. You may need to add a custom version of the cover shortcode to handle gifs differently, as suggested in that Hugo issue (or wait until it's fixed in Hugo).

spacefan commented 2 years ago

Right, I wasn't sure if it would work. You may need to add a custom version of the cover shortcode to handle gifs differently, as suggested in that Hugo issue (or wait until it's fixed in Hugo).

Ok, i'll try to address this problem.

LisaFC commented 1 year ago

Underlying Hugo issue seems to have been fixed so I'm closing this.