An SVG is all you need

jon.recoil.org

65 points by sadiq 3 hours ago


orliesaurus - 28 minutes ago

My day job involves building dashboards, and SVGs have been invaluable for crisp icons and graphs... the portability across sizes is a blessing, but some of the more exotic filter effects still fail in certain browsers.

ALSO I've run into security reviews that flag inline SVGs because they can embed scripts... would love to see more tooling to lint and sanitize them before deployment.

BUT seeing a two-decade-old vector still render correctly gives me confidence that the core spec is solid.

jonludlam - 39 minutes ago

Author here: I've just made a ninja edit of the post as it didn't really make clear a quite important point - the SVG is literally 20 years old, and still works, astonishingly. I'm not sure much else I wrote around the time would still work without some editing!

martijn_himself - an hour ago

>They are supported on just about every device and platform

Except they aren't. I recently used a simple SVG in a background and Safari wasn't able to render it properly so after trying lots of different things I gave up and used different sizes of raster images instead.

ludwigschubert - an hour ago

The first Distill publication[0] made tasteful use of minimal interactivity through JavaScript/d3.js[1] on top of SVGs. Many of the illustrations were initially drawn in GUI editors.

(Outstanding work by Shan Carter; it’s what I first saw of his style and it’s what made me want to join his team.)

[0] https://distill.pub/2016/augmented-rnns/ [1] https://github.com/distillpub/post--augmented-rnns/blob/mast...

xxmarkuski - an hour ago

I use ChatGPT to compress SVGs, in particular QR codes. Many QR code SVG generators produce inefficient SVGs, and conventional SVG compressors often lack the understanding required for some compression techniques. ChatGPT can replace alignment indicators with <use> elements.

Is there a way to embed the data encoded in the QR code directly within the image? This would allow the data to be parsed directly by the browser, eliminating the need for computer vision to decode it again. Going further, for web images QR codes could be efficiently encoded and rendered by the browser.

WillAdams - an hour ago

Ages ago, when doing the instructions for the opensource CNC Shapeoko v2 it became necessary (after the project was featured w/ a full page in _Popular Mechanics_ magazine to cater to users who could not visualize as well as the early adopters were able to, so the diagrams were made interactive:

https://github.com/shapeoko/Docs/blob/gh-pages/content/tPict...

Used to be if that was opened in a web browser one could click on the parts list to show/hide or highlight/unhighlight the matching items in the diagram.

Done using Inkscape if memory serves.

tracerbulletx - an hour ago

This feels a little bit like discovering frontend software development? I guess we're done with the trend of being scared of bundling features and running them in the browser close to the user with JavaScript.

morshu9001 - 29 minutes ago

An SVG and JS, right? It's not interactive on its own.

lucid-dev - 2 hours ago

This is going to really transform some data visualization things I've been thinking about. I've always loved SVG since working with Illustrator and Inkscape back in the day, but I didn't realize how much it could tie in with the modern web and interactivity. Thank you!

drewg123 - 19 minutes ago

I hate that slack doesn't support svg. So we end up taking screenshots of svg flame graphs when discussing things.

WorldPeas - 3 hours ago

all we need is keyboard input and audio output and we have (most of) flash back. I may have to look into this in my idle hours

sturbes - 2 hours ago

I just went down the same rabbit hole, it is totally fun! https://turbek.com/Designing-Interactive-SVGs-with-AI/

TLDR:

- SVG image files: powerful like HTML

- Supported widely in browsers

- Designer tools make SVGs

- SVGs are written in a language

- LLMs are great at manipulating language

- Designers can collaborate interaction into life