Remix.run Logo
chrismorgan 2 days ago

I’ll engage with the editorialised title (which will probably be changed soon), “HTML is a native image format, hear me out”:

  data:image/svg+xml,
  <svg xmlns="http://www.w3.org/2000/svg">
    <foreignObject width="100%25" height="100%25">
      <div xmlns="http://www.w3.org/1999/xhtml">
        Behold!
      </div>
    </foreignObject>
  </svg>
voidUpdate 2 days ago | parent [-]

That's pretty much what I was thinking too. "A way to create an image, with parts that can be edited using tags, that an LLM can deal with... this sounds like SVG"

yeargun 2 days ago | parent | next [-]

yes but not every image/visual is efficiently representable with svgs. sometimes we need rasters

voidUpdate 2 days ago | parent [-]

Luckily, you can embed raster images inside SVGs https://developer.mozilla.org/en-US/docs/Web/SVG/Reference/E...

yeargun 2 days ago | parent [-]

yeah but you know.. it needs to be either base64 or a link

thats why .hmml is a packing strategy to mitigate that, single pack

chrismorgan 2 days ago | parent | prev [-]

In case you missed it—I’m not showing regular SVG, I’m showing using HTML as an image, via an SVG container. This has worked fine in browsers for more than ten years (around twenty, other than IE/Edge).

yeargun 2 days ago | parent [-]

yeah I saw it, thats a crazy trick