News for hackers. Stuff that matters.
Re:The past, present and future of image formats by imaginariet on Thursday August 19, 2021 @06:10AM (#28232126)
From a linked article:

> It would be great if web browsers would accept in an <img> tag all the video codecs they can play in a <video> tag, the only difference being that in an <img> tag, the video is autoplayed, muted, and looped. That way, new and masterful video codecs like VP9 and AV1 would automatically work for animations, and we can finally get rid of the ancient GIF format.

Of course, the typical rebuttal on HN will be "I hate autoplay, nothing should autoplay without an explicit click", which is why we'll be stuck with GIF for another 10 years.

Re:The past, present and future of image formats by gardaani on Thursday August 19, 2021 @06:48AM (#28232308)
Safari already accepts MP4 in an <img> tag and it is autoplayed, muted and looped [1]. Sadly, Chrome doesn't want to implement it [2].

[1] https://developer.apple.com/documentation/webkit/delivering_...

[2] https://bugs.chromium.org/p/chromium/issues/detail?id=791658...

Re:The past, present and future of image formats by acdha on Thursday August 19, 2021 @08:27AM (#28232927)
This is a great example for the “Chrome is the new IE” debate: that’s a feature which would immediately make the web better but they held back support for a standard, hardware-accelerated format trying to force mainstream adoption of their own format which had limited tool support and never performed enough better than JPEG/PNG to be worth the trouble for most sites.
Re:The past, present and future of image formats by pwdisswordfish8 on Thursday August 19, 2021 @09:56AM (#28233862)
s/better/worse/
Re:The past, present and future of image formats by acdha on Thursday August 19, 2021 @11:16AM (#28234927)
You think it's good that people keep using gigantic GIF files rather than smaller videos? There's no technical reason to prefer the GIF format — it burns data transfer, requires more CPU, and has terrible quality.
Re:The past, present and future of image formats by pwdisswordfish8 on Wednesday August 25, 2021 @10:45AM (#28302317)
I prefer <img> elements never to animate at all, regardless of format. Animations should use <video>.
Re:The past, present and future of image formats by Zababa on Thursday August 19, 2021 @07:41AM (#28232632)
> Of course, the typical rebuttal on HN will be "I hate autoplay, nothing should autoplay without an explicit click", which is why we'll be stuck with GIF for another 10 years.

Why? If you believe nothing should autoplay GIFs are also part of the problem.

Re:The past, present and future of image formats by chrismorgan on Thursday August 19, 2021 @08:30AM (#28232960)
Absolutely; I consider GIFs autoplaying to be a bug—unfortunately a bug that would be rather difficult to fix.
Re:The past, present and future of image formats by idoubtit on Thursday August 19, 2021 @10:22AM (#28234169)
It's easy to fix with the right browser. For instance with the Chromium-based Vivaldi, I configured "Image Animation" to "Once", with the other possible values being "Loop" and "Never". You may define a shortcut key to change this setting on the fly.
Re:The past, present and future of image formats by chrismorgan on Thursday August 19, 2021 @11:16AM (#28234936)
That doesn’t fix undesired animated image autoplay, it breaks animated images completely, since you can’t trigger playback on demand like you can with videos.
Re:The past, present and future of image formats by rhdunn on Thursday August 19, 2021 @11:08AM (#28234800)
I personally find animated gifs on things like YouTube community posts visually distracting, as my eyes will continually move to look at what is moving. That's also why I turn off things like the moving tile images on the Windows start menu.
Re:The past, present and future of image formats by magicalhippo on Thursday August 19, 2021 @06:30AM (#28232214)
There are many valid reasons why autoplaying videos should be up to the user.

I'm generally against autoplaying, but I do accept that in some cases it is a nice thing.

So this proposal seems reasonable, if the browsers in addition get a separate option to disable this behavior.

It's important though that javascripts can't override this behavior to prevent abuse (say by unmuting), so browsers would have to take some precaution against that.

Re:The past, present and future of image formats by vbezhenar on Thursday August 19, 2021 @07:50AM (#28232682)
AFAIK Autoplay works fine in modern browser for video tags, just without sound. Enabling it for images does not alter web in any meaningful way IMO.
Re:The past, present and future of image formats by ThePadawan on Thursday August 19, 2021 @09:43AM (#28233730)
I really can't understand why we now have both autoplaying video against the users' wishes and incredibly complicated configuration whether to allow autoplay [0].

[0] https://developer.mozilla.org/en-US/docs/Web/Media/Autoplay_...

Re:The past, present and future of image formats by hulitu on Thursday August 19, 2021 @11:18AM (#28234959)
Because the ad industry pays for the browser.
Re:The past, present and future of image formats by unwind on Thursday August 19, 2021 @07:58AM (#28232731)
I hope most would be okay with it due to the forced (by the browser) muting, i.e. images may animate but they may not make sound, even if they are displaying what is in reality a video stream containing sound.

At least I would be fine with that, and I can be quite annoyed with auto-playing video.