frontpage.
newsnewestaskshowjobs

Open Source @Github

fp.

Open in hackernews

HTML is a native image format, hear me out

https://hmml.eddocu.com
16•yeargun•1h ago

Comments

yeargun•1h ago
## What's an image

We consider rasters as image (.jpeg, .webp, ..)

We also invented svgs, its a vector. SVG is a declarative language, has its own format and has own renderer

HTML, CSS is no different. `<div style="background:black">html is underdog</div>`

Having this perspective on our mind, even considering any imperative code as a native image makes complete sense. `canvas.drawCircle();`

So, .html/.hmml/.js is as image as .webp

====

## How can we/future's genAI models could leverage the world's most popular and feature rich image format (HTML, CSS, JS, SVG, IMAGE altogether). And how can we leverage it to build editable/composable images?

This so to 'popular' image format we call .html has a caveat. It's UTF-8, and whenever you need to embed any resource, you either need to base64 encode it(it has extra size overhead) or link the resource as a seperate thing. So.. as you decide to serve single pack of data for a single image, a binary packing strategy makes sense.(Image can be anything as we discussed earlier)

To match these concerns, we created/proposing you a new format, HMML (HyperMedia Markup Language).

HMML (HyperMedia Markup Language) is a declarative+imperative markup+ language for images/videos/media.. *HMML is HTML, CSS, JS, SVG, image, but not UTF-8.*

https://hmml.eddocu.com

and we have a npm library that does encode/decode of this binary format, and mounts the so to image into dom. (2kb js for encode/decode each. For comparison React is 90kb js. )

`npm i @eddocu/hmml`

# image-leftdog-rightcat.html

``` <div style="display:flex"> <img src="base64" alt="i am dog image" /> <img src="base64" alt="i am cat image" /> </div> ```

Apart from doing this, hmml does embed the html, css, js blueprint into media binaries

# image-leftdog-rightcat.hmml

`binary stuff`

People already do similar things. But this format or POV of thinking accepts html/css/js as a native image format. Excited to see if future operating systems/browsers also accepts this format. <hmml /> or <img src="maybe.hmml" />

===

``` <Technical-Appendix> The word "green apple" is an image, that has no format and no renderer.

`const vectorMultiDimensional_768 = get_word_embeddings("green apple")` Now the word green apple has a format, its: "embedded by Embedding Model X" If you had a renderer as such Embedding_Model_X.render()

Now you could call entire english sentences/paragraphs are images. </Technical-Appendix> ```

bs or not. what you think?

plating1•1h ago
wait this is actually kinda brilliant in a weird way

like when you think about it we're already doing this with svg and nobody bats an eye. svg is literally xml markup that renders as an image and everyone just accepts it as normal

also the composability angle is interesting. being able to edit an "image" by just opening it in text editor instead of photoshop has some appeal

webdevnotlame•58m ago
that sounds interesting but can't find clear use cases
yeargun•38m ago
In fact it has lots of use cases,

1- For design tools, they can combine multipe images, texts, svgs and serve them with single pack/abstraction

2- When you need editable/composable images.

3- Future genai models for generating visuals/html/js/svg would have more feature rich abstraction/toolset

4- When you want to prevent base64 size overhead

c048•36m ago
You can also paint by squashing flies against a wall. Doesn't mean it's a good, or efficient, idea.
yeargun•25m ago
thats a great observation. In fact, I also tried how efficient wall painting is :D

https://x.com/yeargun24/status/1825516494861508943?s=20

And, yes. HTML & CSS rendering without js is doable with like max 400mb of ram? Idk. Sometimes the tradeoff worths, sometimes not

beardyw•35m ago
Isn't this making HTML in some ways more like a PDF? Or am I missing the point?
yeargun•29m ago
Nope

PDF is an irreversible format in terms of editability. (btw I build the world's most performant pdf/pptx editor at https://eddocu.com , I would enjoy if you have any feedback)

Regardless, I cant find the relation in between.

It's like an abstraction that might help future genai models, or a packing strategy, or ..

TazeTSchnitzel•35m ago
I would rather see native browser support for the familiar MHTML (https://bugzilla.mozilla.org/show_bug.cgi?id=40873) than creating a brand new format that does the same thing.

The AI slop homepage is really offputting too.

xnx•31m ago
Chrome started supporting this at some point (though I wish they would've added in more support). Lack of support for mhtml is one of the things keeping me away from Firefox on mobile.
yeargun•31m ago
Completely agree with that. But look whats the situation with MHTML.

""" Open Bug 40873 Opened 26 years ago Updated 27 days ago """

So if you need some such feature in your web app, and if you are okay with 2kb encode/decode js. Its all good.

At least the posts are pretty much not AI slop I guess.. But I'll take your feedback. Thanks!

bjt12345•28m ago
This cute homepage provides me with nostalgic memories of Geocities spinning skull GIFs.
Tade0•25m ago
> Opened 26 years ago Updated 27 days ago

That's a particularly long discussion.

apt-apt-apt-apt•33m ago
There's so much text but nothing that clearly says what it is.

Is it HTML and its contents (e.g. images) in a binary format?

yeargun•28m ago
yes exactly.

you can go devtools at https://hmml.eddocu.com

it downloads single binary that contains media assets (svg, image, video, ..) and html/css blueprint, even js (security concerns!)

blixt•19m ago
If this shows itself to be highly useful as a concept, then I would perhaps avoid reinventing the wheel on the file format side of things, and just standardize what we already have:

- Come up with a file extension (.hmml)

- Decide on an entrypoint filename and format (index.html)

- Use an existing standard for combining resources into one file (tar + zstd)

Now you have something that is usable only using pre-existing tools.

yeargun•14m ago
Yeah I agree

in fact this is both a packing strategy or a POV of thinking. Next browser versions could support it.

<img src="html-underdog.hmml" />

or

when tomorrow's genai models mix declarative images with rasters, then they would like something like this

or

OS -> html-underdog.html double clicks -> browser opens it.

mpeg•15m ago
I don't understand the advantage of this vs an html file with embedded images, except the latter would work with no runtime.
yeargun•12m ago
If you plan to serve your image with a self contained, single pack.

Then with html + rasterized images (.jpeg/.png, ..) you would have to pay extra size overhead caused by base64.

With hmml, you dont

mpeg•7m ago
I get that, but the drawbacks outweigh the benefits imho and the b64 overhead is not solved, just deferred.

Say I want to distribute an hmml file as a single file, I'd have to create an html with the embedded js runtime, and then embed the hmml file... as b64, therefore negating any benefits.

wewewedxfgdf•14m ago
This is the sort of weird thing I would come up with - a solution without a problem perhaps, but a magnificent testament to some technical itch that had to be scratched.
yeargun•6m ago
I mean,

https://eddocu.com It's the worlds most performant pdf / pptx editor on web.

I have a page that I list documents, each with their thumbnails. I serve medium quality rasters(.webp) for them.

I could rather do it via hmml to save up network space for instance. I convert pdf/pptx/docx into completely editable with html at Eddocu.

So I already have everything in html, css, svg, image.

For the ones that can get represented with .hmml i could serve hmml link maybe.

Its an overengineering maybe.

But thats how I made https://eddocu.com world's most performant pdf/pptx editor. (alpha release, has bugs.)

warpech•8m ago
What wrong with inlining base64 in regular .html if you want it all in one file?

Plus zipping that one file is you insist on a smaller file size

yeargun•4m ago
Same zip also helps serving .hmml from cdns smaller (gzip/brotli)

Even then base64 is worse in size though

Also I wouldn't prefer serving a zip and load and render it within my web app (extra overheads).

AbuAssar•6m ago
this page failed to convey what exactly is the main pitch, is it a new image format? using html as image? rendering with canvas?

I got lost

yeargun•4m ago
sorry for this, im updating

in the meantime you can take a look at this

https://www.reddit.com/r/Design/s/hv0hyBow9I

unleaded•4m ago
https://www.nicovideo.jp/watch/sm2796083

Archive-Minter – An offline-first web archiver built in Rust

https://github.com/DionisGedeshi/archive-minter
1•dioni_•40s ago•0 comments

USB Power Delivery: Plugging into the Benefits

https://www.aptiv.com/en/insights/article/usb-power-delivery-plugging-into-the-benefits
1•mooreds•3m ago•0 comments

iFixit tears down Trump Mobile [video]

https://www.youtube.com/watch?v=XHpP5otFv4M
1•peteforde•3m ago•0 comments

Mozilla to increase its free Firefox VPN limits and locations until Aug 31

https://blog.mozilla.org/en/firefox/firefox-built-in-vpn-summer/
1•exploraz•4m ago•0 comments

FlowG v0.59.0 with Dark Mode support

https://flowg.cloud/blog/darkmode
1•linkdd•7m ago•0 comments

A 5.3M-year-old deep-sea whale necropolis in the Diamantina Zone

https://www.nature.com/articles/s41586-026-10546-z
2•whicks•11m ago•0 comments

US Military Shahed-136 Kamikaze Drone Clone Getting Hivemind Swarming Capability

https://www.twz.com/air/u-s-militarys-lucas-kamikaze-drone-is-getting-hivemind-swarming-capability
1•prmph•11m ago•1 comments

Big tech apps that make life easy are scamming you

https://restofworld.org/2026/tech-facebook-google-whatsapp-scams/
1•donohoe•12m ago•0 comments

Show HN: EzziwebTools – A collection of 30 free tools

https://ezziwebtools.com
1•Ezzymd•12m ago•0 comments

Anthropic apologizes for invisible Claude Fable guardrails

https://www.theverge.com/ai-artificial-intelligence/948280/anthropic-claude-fable-invisible-disti...
1•rarisma•13m ago•0 comments

Show HN: AlfinaAI – AI stock and IPO analysis for retail investors

https://alfina.ai
2•stockanalyst987•15m ago•0 comments

InventorySpread – Newsletter ad slots priced below affiliate revenue

https://inventoryspread.com
1•Northtide•17m ago•1 comments

Active-active fixed our counters but broke everything else

https://useautumn.com/blog/active-active-redis-cache
2•johnyeocx•19m ago•0 comments

Python tool for converting files and office documents to Markdown

https://github.com/microsoft/markitdown
2•mooreds•20m ago•0 comments

Creating Photo Essays About Community: A Guide to Our Where We Are Contest

https://www.nytimes.com/2024/02/14/learning/creating-photo-essays-about-community-a-guide-to-our-...
1•tlyleung•21m ago•0 comments

Geopolitics fuel grain market volatility

https://www.kpler.com/blog/geopolitics-fuel-grain-market-volatility
1•mooreds•21m ago•0 comments

A Commons of Software Productive Infrastructure, by and for Capital

https://marewolf.me/posts/draupnir/26/software-productive-infrastructure.html
1•simonmic•22m ago•0 comments

Brit workers waste nearly six hours a week 'botsitting'

https://www.theregister.com/ai-and-ml/2026/06/10/brit-workers-waste-nearly-six-hours-a-week-botsi...
4•theanonymousone•22m ago•1 comments

Parallelogram – catch fine-tuning dataset bugs before training

https://www.parallelogram.dev/
1•thatayotlhe04•22m ago•0 comments

Hedge Funds Are Expanding Desks Designed to Profit from Natural-Catastrophe Risk

https://www.bloomberg.com/news/articles/2026-06-07/hedge-funds-are-hiring-experts-in-catastrophe-...
2•giuliomagnifico•24m ago•0 comments

Bootstrapping Rust Considered Harmful

https://www.ntecs.de/blog/2026-02-01-bootstrapping-rust-considered-harmful/
1•birdculture•25m ago•0 comments

I procrastinate by building tools to stop me from procrastinating: A sad story

2•thisislorenzov•27m ago•3 comments

Show HN: LoadLore – what if your team's way of working was installable?

https://loadlore.dev
1•whitephoenix•27m ago•0 comments

Merle: Why Even Signal Calls Apple and Google [video]

https://www.youtube.com/watch?v=c3ennD3wKn0
1•smukherjee19•27m ago•0 comments

The Riemann Hypothesis – interactive explanation

https://riemann.adilmoujahid.com
1•lifty•27m ago•0 comments

Shadow AI threat's growth affecting healthtech's growth

https://www.verax.ai/blog/shadow-ai-healthtech-deals
1•jasonchernofsky•27m ago•0 comments

Amazon-owned Ring should pay Americans for scanning their faces, lawsuit says

https://arstechnica.com/tech-policy/2026/06/amazon-owned-ring-should-pay-americans-for-scanning-t...
3•anticorporate•28m ago•0 comments

Odin 2026-06 Released

https://github.com/odin-lang/Odin/releases/tag/dev-2026-06
1•lerno•30m ago•0 comments

Apple's Passwords App Becomes Agentic

https://www.heise.de/en/news/Apple-s-Passwords-App-Becomes-Agentic-11328901.html
2•Tomte•33m ago•0 comments

Claude Opus is more performant on OpenCode than Claude Code

https://artificialanalysis.ai/agents/coding-agents
4•log101•34m ago•0 comments