question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Adding SVG base 64 support

See original GitHub issue

Hi

First of all thank you very very much for this wonderful and easy to use social sharing plugin. After searching for days I can say this is the best plugin ever.

I did some minor changes to the core files to add base64 svg support for social logos.

In jssocial.js file I changed line 16 to the following:

var IMG_SRC_REGEX = /(\.(jpeg|png|gif|bmp|svg\+xml)$|^data:image\/(jpeg|png|gif|bmp|svg\+xml);base64)/i;

I hope this could help some people who just like me prefer SVG icons to font icons when you only need 1 or 2 of them.

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:7 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
holographixcommented, Sep 14, 2016

jeez, that was fast!
Thx!

0reactions
tabalinascommented, Sep 14, 2016

@holographix, you are right. The issue is fixed.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to embed base64 images in SVG - Java PDF Blog
Step 1 Convert image to base64 string. There are several ways to do this. Here is a Java example. ; Step 2 Create...
Read more >
Probably Don't Base64 SVG - CSS-Tricks
But yeah, base64 is probably not always a good idea but svg can contain unsafe characters (remember, vector image can contain bitmap parts…)....
Read more >
Base64 / SVG HTML image is not displayed - Stack Overflow
You don't have to encode it as base64, pure svg can be used, this makes it much more readable, as well as smaller...
Read more >
How to Use SVGs with Base64 - YouTube
In this video, we'll talk about using SVG with Base64 to inject our SVG into the img tag or into CSS with the...
Read more >
SVG to Base64 - Code Beautify
Open SVG to Base64 tool, use Upload SVG button to upload SVG file. · Once file is been uploaded, this tool starts converting...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found