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

Is https://imgsrv.roll20.net/?src still needed for images on character sheets?

1635773659
Peter B.
Pro
Sheet Author
On the sheet that I maintain, the logo image url looks like this:&nbsp; <a href="https://imgsrv.roll20.net/?src=https://i.stack.imgur.com/CN5gs.png" rel="nofollow">https://imgsrv.roll20.net/?src=https://i.stack.imgur.com/CN5gs.png</a> Is the prefix&nbsp; <a href="https://imgsrv.roll20.net/?src=" rel="nofollow">https://imgsrv.roll20.net/?src=</a> &nbsp; still needed or is it a very old deprecated thing?
1635774471
GiGs
Pro
Sheet Author
API Scripter
I dont know if you ever needed to insert that manually, but if you did once upon time, you don't now. I think roll20 does process all images through an image server, but that is transparent to sheet creators and users. Just use the normal image link, but ideally, make sure it is saved in your sheet's github site so that it doesnt get lost if anything happens at the remote host.
1635791672

Edited 1635791784
vÍnce
Pro
Sheet Author
Peter B. said: On the sheet that I maintain, the logo image url looks like this:&nbsp; <a href="https://imgsrv.roll20.net/?src=https://i.stack.imgur.com/CN5gs.png" rel="nofollow">https://imgsrv.roll20.net/?src=https://i.stack.imgur.com/CN5gs.png</a> Is the prefix&nbsp; <a href="https://imgsrv.roll20.net/?src=" rel="nofollow">https://imgsrv.roll20.net/?src=</a> &nbsp; still needed or is it a very old deprecated thing? I simply link to the image on the repo in the sheet code &lt; img src = " <a href="https://raw.githubusercontent.com/Roll20/roll20-character-sheets/master/ADnD_1E/images/logo.png" rel="nofollow">https://raw.githubusercontent.com/Roll20/roll20-character-sheets/master/ADnD_1E/images/logo.png</a> " /&gt; but you'll notice(using the browser's dev tools) that roll20 will convert the link regardless. Not sure why... Perhaps security reasons. IDK &lt;img src=" <a href="https://imgsrv.roll20.net?src=https%3A//raw.githubusercontent.com/Roll20/roll20-character-sheets/master/ADnD_1E/images/logo.png" rel="nofollow">https://imgsrv.roll20.net?src=https%3A//raw.githubusercontent.com/Roll20/roll20-character-sheets/master/ADnD_1E/images/logo.png</a> "&gt;
1635797288
GiGs
Pro
Sheet Author
API Scripter
I believe they do that to make sure any links embedded in character sheets are safe, and arent running any kind of malware on your character sheets. Running it through some kind of validation server makes sure it is actually an image, and not somethign else made to appear to be an image. For a site like roll20, it's important to validate anything that comes from external servers.
1635854403
Peter B.
Pro
Sheet Author
vÍnce said: Peter B. said: On the sheet that I maintain, the logo image url looks like this:&nbsp; <a href="https://imgsrv.roll20.net/?src=https://i.stack.imgur.com/CN5gs.png" rel="nofollow">https://imgsrv.roll20.net/?src=https://i.stack.imgur.com/CN5gs.png</a> Is the prefix&nbsp; <a href="https://imgsrv.roll20.net/?src=" rel="nofollow">https://imgsrv.roll20.net/?src=</a> &nbsp; still needed or is it a very old deprecated thing? I simply link to the image on the repo in the sheet code &lt; img src = " <a href="https://raw.githubusercontent.com/Roll20/roll20-character-sheets/master/ADnD_1E/images/logo.png" rel="nofollow">https://raw.githubusercontent.com/Roll20/roll20-character-sheets/master/ADnD_1E/images/logo.png</a> " /&gt; but you'll notice(using the browser's dev tools) that roll20 will convert the link regardless. Not sure why... Perhaps security reasons. IDK &lt;img src=" <a href="https://imgsrv.roll20.net?src=https%3A//raw.githubusercontent.com/Roll20/roll20-character-sheets/master/ADnD_1E/images/logo.png" rel="nofollow">https://imgsrv.roll20.net?src=https%3A//raw.githubusercontent.com/Roll20/roll20-character-sheets/master/ADnD_1E/images/logo.png</a> "&gt; Thank you Vince. That was exactly what I was looking for. Now I can confidently move forward with my idea :)
1635873010

Edited 1635874095
Peter B.
Pro
Sheet Author
vÍnce said: I simply link to the image on the repo in the sheet code &lt; img src = " <a href="https://raw.githubusercontent.com/Roll20/roll20-character-sheets/master/ADnD_1E/images/logo.png" rel="nofollow">https://raw.githubusercontent.com/Roll20/roll20-character-sheets/master/ADnD_1E/images/logo.png</a> " /&gt; but you'll notice(using the browser's dev tools) that roll20 will convert the link regardless. Not sure why... Perhaps security reasons. IDK &lt;img src=" <a href="https://imgsrv.roll20.net?src=https%3A//raw.githubusercontent.com/Roll20/roll20-character-sheets/master/ADnD_1E/images/logo.png" rel="nofollow">https://imgsrv.roll20.net?src=https%3A//raw.githubusercontent.com/Roll20/roll20-character-sheets/master/ADnD_1E/images/logo.png</a> "&gt; Can you help me with linking to an image? if I go to the url:&nbsp; <a href="https://raw.githubusercontent.com/Roll20/roll20-character-sheets/master/AD&amp;D%202E%20Revised/img/sheet-logo.png" rel="nofollow">https://raw.githubusercontent.com/Roll20/roll20-character-sheets/master/AD&amp;D%202E%20Revised/img/sheet-logo.png</a> <a href="https://raw.githubusercontent.com/Roll20/roll20-character-sheets/master/AD%26D%202E%20Revised/img/sheet-logo.png" rel="nofollow">https://raw.githubusercontent.com/Roll20/roll20-character-sheets/master/AD%26D%202E%20Revised/img/sheet-logo.png</a> Then it works fine. But when I add it to the sheet as an image and run the sheet, it does not load nicely: <a href="https://imgsrv.roll20.net/?src=https%3A//raw.githubusercontent.com/Roll20/roll20-character-sheets/master/AD&amp;D%202E%20Revised/img/sheet-logo.png" rel="nofollow">https://imgsrv.roll20.net/?src=https%3A//raw.githubusercontent.com/Roll20/roll20-character-sheets/master/AD&amp;D%202E%20Revised/img/sheet-logo.png</a> I fear the problem is with the special character &amp; and the whitespaces
1635874913
GiGs
Pro
Sheet Author
API Scripter
There have been problems before with images because of folders with special characters in them. I think you can change the folder name to avoid that. What url are you using in your character sheet? If you are using this: <a href="https://raw.githubusercontent.com/Roll20/roll20-character-sheets/master/AD&amp;D%202E%20Revised/img/sheet-logo.png" rel="nofollow">https://raw.githubusercontent.com/Roll20/roll20-character-sheets/master/AD&amp;D%202E%20Revised/img/sheet-logo.png</a> Try changing it to <a href="https://raw.githubusercontent.com/Roll20/roll20-character-sheets/master/AD&amp;D" rel="nofollow">https://raw.githubusercontent.com/Roll20/roll20-character-sheets/master/AD&amp;D</a> 2E Revised/img/sheet-logo.png
1635875348
vÍnce
Pro
Sheet Author
Exactly what GiGs has brought up.&nbsp; I had to change the 1e sheets folder name on the repo a few years back because it was causing issues linking to git images... <a href="https://github.com/vince-roll20/roll20-character-sheets/commit/440fc770a07c59d41ad083f9216e99b1ba2fca61#diff-3a77ba65768c1268e43d8d305f343babd362aab6b62fd50c626f7974f0469d33" rel="nofollow">https://github.com/vince-roll20/roll20-character-sheets/commit/440fc770a07c59d41ad083f9216e99b1ba2fca61#diff-3a77ba65768c1268e43d8d305f343babd362aab6b62fd50c626f7974f0469d33</a>
1635877396
Peter B.
Pro
Sheet Author
GiGs said: There have been problems before with images because of folders with special characters in them. I think you can change the folder name to avoid that. What url are you using in your character sheet? If you are using this: <a href="https://raw.githubusercontent.com/Roll20/roll20-character-sheets/master/AD&amp;D%202E%20Revised/img/sheet-logo.png" rel="nofollow">https://raw.githubusercontent.com/Roll20/roll20-character-sheets/master/AD&amp;D%202E%20Revised/img/sheet-logo.png</a> Try changing it to <a href="https://raw.githubusercontent.com/Roll20/roll20-character-sheets/master/AD&amp;D" rel="nofollow">https://raw.githubusercontent.com/Roll20/roll20-character-sheets/master/AD&amp;D</a> 2E Revised/img/sheet-logo.png I tried both encoded and decoded versions. Neither worked. Guess I have to change the folder name, as suggested by Vince. I will look into it. I guess it should not break anything right?.... right? :S
1635877865

Edited 1635878281
vÍnce
Pro
Sheet Author
My comment from my repo folder change might better explain what I discovered at the time. The &amp; character is replaced by %26 to make a legal url. But it looks like in this case, the % in %26 has then been replaced again, the code for % is %25, resulting in %2526 where the &amp; should be in that URL. One caveat that I noticed with changing the folder name is that I believe the history of changes stays with the old folder name. New folder starts a new history of changes moving forward. If you need to go back to work with an older state of the code, I think you also have to work with an older version of the repo. The only time I've needed to worry about that is if I was migrating older attribute data for some reason and needed to create older characters (previous versions of the sheet code) to ensure migration of data was working properly. Just something I noticed.