Hasty Briefsbeta

Bilingual

HTML is a native image format, hear me out

7 hours ago
  • #media format
  • #web development
  • #HMML
  • HMML (HyperMedia Markup Language) is a declarative markup language for images that combines HTML, images, and other media into a single binary file.
  • It preserves elements like vector graphics, text, raster images, 3D, and motion as separate, composable, and editable layers, unlike traditional images that flatten everything into a raster.
  • The format allows for creation and editing at the node level, enabling changes to individual elements without re-rendering the whole, and supports diffing, versioning, and remixing.
  • It enables restyling, relocalization, and animation post-creation, with generated output that remains source-editable rather than being a static screenshot.
  • HMML packages output from models (like HTML, CSS, SVG) with raw media into a portable contract, with a small reader (~2 KB) for universal opening.
  • It facilitates the delivery of complex scenes as a single file, which apps can fetch, decode, and mount into a div, simplifying asset management.
  • The format supports arranging images in 2D/3D, layering, and animating while keeping all pieces editable and recomposable for new visuals.
  • It uses a PNG-style signature with self-describing chunks, keeping markup as text and images raw, and allows growth without breaking by skipping unknown chunks.
  • Encoding involves packing HTML into a .hmml file by extracting data images as raw bytes and compressing HTML/CSS/JS, while decoding reconstructs the document for rendering in browsers.