Skip to content

A query in WebP support in browsers and MarkDown previews on GitHub and in VS Code

Notifications You must be signed in to change notification settings

LANSELOT/markdown-webp

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 

Repository files navigation

MarkDown Animated WebP

This repository serves as a test of animated WebP support in GitHub and VS Code MarkDown previews when a WebP image is embedded in the MarkDown document as an image.

Test image courtesy of Mathias Bynens.

Support

WebP has good, but not amazing browser support:

https://caniuse.com/#feat=webp

The lack of support in Safari is a bummer.

  • Supported in VS Code MarkDown preview
  • Supported in GitHub MarkDown preview

Alternatives

For animation in MarkDown, the current options include:

  • SVG with CSS animation: vector, performant, well compressible in transit
  • GIF: raster, old, big, slow and ugly, should not be used for anything ever

The following are unfortunately not well supported:

  • MP4: video is not supported in MarkDown and embedding as an image won't work
  • APNG: might be an option actually: https://caniuse.com/#feat=apng
  • MNG: ?

Takeaway

Use SVG whenever possible, add animation using CSS animations where beneficial.

To-Do

Ensure the MP4 claim is correct

Test out APNG and MNG in GitHub and VS Code MarkDown previews

About

A query in WebP support in browsers and MarkDown previews on GitHub and in VS Code

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published