user1542316
user1542316

Reputation: 158

inline svg in CSS (base64 vs urlencode issue)

due to https://css-tricks.com/probably-dont-base64-svg/

That base64 is 33% bigger than original, but raw svg is not worked on IE. So I need to urlencode it.

Here's the problem, when I urlencode it, the result is BIGGER than base64's result. (I use urlencode & rawurlencode function in PHP, both are bigger than base64_encode)

So why base64 svg is not recommended? Am I somewhere wrong or misunderstanding?

Upvotes: 2

Views: 797

Answers (1)

Tank
Tank

Reputation: 56

You're right

It is the best solution to base64encode inline SVG because of IE needs to urlencode it. But urlencoded is the same or even much bigger than base64 encode. Thats tricky!

Upvotes: 1

Related Questions