News for hackers. Stuff that matters.
Re:Show HN: A cool Drag-and-Drop implementation for Svelte by chrismorgan on Tuesday January 12, 2021 @03:38AM (#25743959)
Please don’t put a 10MB GIF in a page. Link to it instead, or better still to a video (GIF is an irredeemably bad format that no one should ever use any more).
Re:Show HN: A cool Drag-and-Drop implementation for Svelte by dspillett on Tuesday January 12, 2021 @07:07AM (#25745767)
> GIF is an irredeemably bad format that no one should ever use any more

IIRC there is no other option if you want to include animation in a GitHub readme, as it will only include image formats inline that way. Otherwise you could use a video, which for this content would likely be larger but would have the advantage of being able to not auto-play.

Of course "don't include animation at all" would be a valid opinion, though not one likely to meet with universal agreement.

Re:Show HN: A cool Drag-and-Drop implementation for Svelte by davidmurdoch on Tuesday January 12, 2021 @09:14AM (#25747136)
You can put animated svgs in github markdown.
Re:Show HN: A cool Drag-and-Drop implementation for Svelte by dspillett on Tuesday January 12, 2021 @09:32AM (#25747351)
I'm not sure that would help here. How would the author easily create so an SVG from the recording of his app/component in action?

Naive conversion will result in something much larger than the gif so not address the original complaint of "large chunk of auto-download/play content on the readme page".

Re:Show HN: A cool Drag-and-Drop implementation for Svelte by davidmurdoch on Wednesday January 13, 2021 @09:37AM (#25762446)
Sorry, I was just responding to your comment on general:

> IIRC there is no other option if you want to include animation in a GitHub readme

Not the parent.

In any case, I wonder if it can be done with an embedded `video` tag. Maybe if the video is data URI encoded it could work?

Re:Show HN: A cool Drag-and-Drop implementation for Svelte by mzs on Tuesday January 12, 2021 @09:31AM (#25747344)
You can use video on git hub pages (.io) instead.
Re:Show HN: A cool Drag-and-Drop implementation for Svelte by belval on Tuesday January 12, 2021 @10:44AM (#25748327)
I much prefer 10MB GIF in the README than looking around for a link to a video. It's not even slow to open, by the time I was had scrolled to it, it was running and to me the experience was seamless.
Re:Show HN: A cool Drag-and-Drop implementation for Svelte by g0ran on Tuesday January 12, 2021 @04:30AM (#25744365)
Yup, screenshot or two with links to 'see it in action' is much better way to go.
Re:Show HN: A cool Drag-and-Drop implementation for Svelte by gen_greyface on Tuesday January 12, 2021 @06:26AM (#25745408)
what else do you suggest as an alternative to GIF.
Re:Show HN: A cool Drag-and-Drop implementation for Svelte by chrismorgan on Tuesday January 12, 2021 @08:08AM (#25746305)
It’s a video. Video formats are designed for this sort of thing.
Re:Show HN: A cool Drag-and-Drop implementation for Svelte by jansan on Tuesday January 12, 2021 @06:59AM (#25745685)
webm supports animations.
Re:Show HN: A cool Drag-and-Drop implementation for Svelte by khangnd on Tuesday January 12, 2021 @03:41AM (#25743984)
And what are you talking about?
Re:Show HN: A cool Drag-and-Drop implementation for Svelte by r6203 on Tuesday January 12, 2021 @03:54AM (#25744088)
He's talking about the gif in the Github repo.