kc0bfv / autophugo

AutoPhugo [ˌɔtoʊˈfjuːgəʊ] is a gallery/photoblog theme for Hugo that's a little more automatic than Phugo.
Other
97 stars 56 forks source link

Animations / Videos don't seem to work #37

Open mterhar opened 2 years ago

mterhar commented 2 years ago

I've tried putting an MP4 and GIF into the assets directory. MP4 was ignored. Gif was rendered as a still frame.

Optimally, I'd love to have a solution where it can render a still frame or image in the gallery and then once opened, would embed an mp4 video in the box.

Where does this fall on the scale from should already work to completely impossible?

kc0bfv commented 2 years ago

@mterhar the gif gets processed by Hugo - this theme heavily relies on Hugo's image processing tools to resize things for thumbnail and reasonable-fullsize. I think animated gif is probably just not supported by that, so you get the result you experienced.

Integration of videos seems possible, and I think others have requested it too.

We might implement both in the same way... We might require the user to drop the still-frame version into the assets directory as current... Then add in a frontmatter option for the URL of the full-size version. This would provide all kinds of flexibility - the full size could be completely different from the small, for instance. It wouldn't be a drop-and-go solution like autophugo is intended to be of course... I think the lightbox solution I'm using right now (magnific popup) automatically supports videos and animated gifs properly, but if not it's still just a matter of fixing those to figure out the right thing to do based on URL, or filetype, or additional frontmatter options.

borco commented 1 year ago

I would also like to see this working. For me, using hugo v0.101.0-9f74196ce611cdf6d355bfb99fd8eba5c68ef7f8+extended, GIF images worked out of the box - they were animated both on the main page and when clicked.

MP4 videos were ignored and didn't generate anything.

It would be nice if this would work:

mterhar commented 1 year ago

Thanks for the update. I'll use animated gifs for now since they kinda work. I hadn't tried to rebuild recently.