Roll20 uses cookies to improve your experience on our site. Cookies enable you to enjoy certain features, social sharing functionality, and tailor message and display ads to your interests on our site and others. They also help us understand how our site is being used. By continuing to use our site, you consent to our use of cookies. Update your cookie preferences .
×
Create a free account

[Help] Does Roll20 Support Base64 Encoded SVG/PNG?

1455077598
Carl T
Sheet Author
It looks like having escaped Unicode in a CSS content attribute is treated as a security violation even though it's a well known technique . Are there any tricks to doing this? Using unicode characters saves me the hassle of making icons, managing tiny external assets, and saves on requests. (23:01:54.102 Potential CSS security violation; character sheet template styling thrown out.1 app.js:43:25266) Another possibility is to base64 encode a SVG (or PNG if I have to) and use it as a background image. Is this is something that Roll20 will also allow?
1455081557
The Aaron
Roll20 Production Team
API Scripter
Roll20 does not support Base64 encoded images embedded in character sheet CSS.  That would be a good candidate for the Suggestions and Ideas forum.
1455116602
Lithl
Pro
Sheet Author
API Scripter
In fact, the same piece of JavaScript that generates that "potential CSS security violation" for certain ranged of Unicode escape characters (IIRC it doesn't fire on all  Unicode escapes, but it's been a while since I've looked) will trigger off a data URL appearing in your CSS. However, if you're just trying to put some Unicode symbol in your CSS, such as "✓" for example, you can put the actual symbol in the CSS file instead of "\2713". It does require saving the file with the appropriate encoding and the GitHub -> Roll20 Character Sheet process has been screwed up by BOMs in the past, but it works, as proven by several existing sheets such as Exalted 2e.
1455121374
Carl T
Sheet Author
Thanks for the verification guys. Sounds like I have to use tiny images. :/ Brian: I already tried cut/paste the actual symbol into the CSS as you suggested but no success. Works in my local test environment, but fails on the Roll20 preview tabs. Since I'm cutting/pasting into the preview environment on Roll20 I'm assuming that the clipboard preserves whatever byte formatting I need to get this to work. If so I must be outside the allowable range. For the record I'm trying to use Dagger Knife and Raised Fist .
1455281201
Carl T
Sheet Author
What's the recommended way for testing images in the character sheet? Do I have to find some way of hosting the images myself? I assume that if my sheet is hosted on Roll20 that I can just reference the images relative to the sheet's directory. Is that correct?
1455306289
Kryx
Pro
Sheet Author
API Scripter
I host mine on imgur.
1455311920
Carl T
Sheet Author
Kryx: Do you mean for testing or even when the sheet is complete and hosted on roll20?
1455311991
Kryx
Pro
Sheet Author
API Scripter
Both. I just upload the image and then reference that URL in my css (or html if you're using <img>)
1455329883
Carl T
Sheet Author
Ok so the "solution" to this for me was to move the unicode characters out to HTML as that seems acceptable to Roll20. Lot of extra repetition vs. CSS content, but bypasses the need to external host images for what I consider a trivial case. It seems unbelievable that images can't be served off the roll20 servers for character sheets. Thanks for the help peeps!
In the character journal, you and your players can up load images to the Bio and Information section.  Its a separate tab in the journal (not the character sheet), but its right there . Honestly, adding and image to the character sheet is a bit superfluous. 
1455432653
Lithl
Pro
Sheet Author
API Scripter
Are you responding to the right thread, CPP? Carl is talking about using Unicode symbols in his character sheet, and was considering resorting to using small images since using Unicode escape characters in CSS isn't permitted.