Live data from Hacker News

An SVG is all you need

jon.recoil.org

21–30 of 155 posts

Re: An SVG is all you need

#23
post #20

>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.

SVGs also are mostly unsupported for og:image tags (dependents on the app/browser). I know it's supper specific and I am not even sure if open graph is standardized protocol or not, but it's used everywhere.

yeah, I was super disappointed to find that out when I built previews for https://hexrgb.pages.dev

Re: An SVG is all you need

#24

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 cl…

That looks cool!

Re: An SVG is all you need

#26
post #20

>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.

SVGs also are mostly unsupported for og:image tags (dependents on the app/browser). I know it's supper specific and I am not even sure if open graph is standardized protocol or not, but it's used everywhere.

[deleted]

Re: An SVG is all you need

#27

>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.

They are also not supported on iOS native apps. We use pdfs for vectors.

Re: An SVG is all you need

#29
I really like SVG, I did a lot of things with it and some interesting ones. The only blame I have is that it is sometime slow.

Like for QR Code, precise maps or +100 pixels wide squares. More than 100 "DOM" elements and it will take multiple seconds to show.

The animations also are slow too, compared to canvas, plain CSS or Lottie but nothing very cursed, it's mostly fine.

Re: An SVG is all you need

#30

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 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, eli…

> I use ChatGPT to compress SVGs, in particular QR codes

Why? svgomg.net exists, uses far fewer resources, and is going to give you much better results.

Post reply on HN