KXI System

🌌 Testing embedded SVG in Bear posts

So Bear supports using SVG like regular images just fine, here it is below using the Milky Way 🌌 emoji from the Twemoji library:

What's interesting about Bear is the above used the HTML img tag instead of using markdown, I've seen it used to do some cool tricks like Notion Style callouts. What got me thinking is can Bear handle embedded SVGs?

And it does so surprisingly well!

Above is the raw SVG data from the emoji embedded into the post itself, and not linked to like a regular image. I didn't need a link from an upload or anything, that emoji lives right here inside this post.

I've read on a suggestion board post that data urls for images won't be supported to prevent the platform turning into a storage server, which is why I'm surprised SVG's are allowed.

There are upsides and downsides. The upside is unlike regular images, SVG's are tiny. I purposely used the Milky Way 🌌 emoji since that's on the bigger side for a Twemoji vector, but even then its still only a few kb in size. The downside for a decently detailed SVG it takes up a lot of characters, which is bulky to edit around. And also SVGs aren't "normal" images like PNGs, so there's extra effort to turn a regular image into one.

I'm not sure what I'll do with this information, or what the Bear community as a whole. Maybe Herman will patch out the ability to use SVGs in posts, or just removing it for free blogs (which this is).

For me, I never intended to post images on this blog. Now though, if I really want or need to I could in a special way.

updated: 6Β months, 2Β weeks ago
>> Reply by email

#dev #rambling