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

Adding an image to the Title of the default roll template

I saw a post about this a while back and am trying to replicate it. Apparently you could upload an image and tell the macro to use that image.  I cannot get it to work and was wondering if someone would be willing to write out the step by step process?
Addition: This was the code I saw:  &{template:default}{{name=[x]( YOUR_IMAGE_URL #.png)}}{{test=foo}} but I don’t know where to save my png file so it can see it
1705016464

Edited 1705016478
If you upload a picture to Roll20, then use that image somewhere (handout, token default image, etc.) you can right click on the image and get the location where Roll20 has stored the image and use that. You won’t be able to use the token when it’s on the VTT though, as right-clicking will bring up the Roll20 context menu (changing token settings, changing layers, etc.) and you won’t see the computer context menu that will let you save-as or find the image location. 
1705019186
The Aaron
Roll20 Production Team
API Scripter
selecting a token and hitting Z is the easiest way to get an image you can right click to copy the URL.
Ok, that was helpful.  However, the code does not seem to resolve.  Is there some sort of syntax I need to add or omit? Resolves to this:
Pretty sure the [x](#.png) is needed with the URL. so in your example {{name=[x](<a href="https://files.d20.io/images/374971798/mleNAfFktGOvtZmbOwqPFA/original.png?17050081885#.png" rel="nofollow">https://files.d20.io/images/374971798/mleNAfFktGOvtZmbOwqPFA/original.png?17050081885#.png</a>)}}
1705047035
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
In the case of a Roll20 image (they are all converted to pngs upon upload), it should suffice just to use: {{name=[x](<a href="https://files.d20.io/images/374971798/mleNAfFktGOvtZmbOwqPFA/original.png" rel="nofollow">https://files.d20.io/images/374971798/mleNAfFktGOvtZmbOwqPFA/original.png</a>)}} I don't think the cache buster numbers at the end perform a useful function here. But test it. I could be wrong. If you don't want to mess with lengthy URLs, and don't want to take up your quota, you can use an&nbsp; image service like imgur.com to host the graphics.
&amp;{template:default} {{name=[x](<a href="https://files.d20.io/images/374971798/mIeNAfFktGOvtZmbOwqPFA/original.png?17050081885" rel="nofollow">https://files.d20.io/images/374971798/mIeNAfFktGOvtZmbOwqPFA/original.png?17050081885</a>)}} This is what I ended up having to do for it to recognize it and resolve.&nbsp; However, I am not actually getting the picture. I appreciate all the help so far.&nbsp; It feels like we are so close! ha ha. Still no picture:
1705076992
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
Get rid of the cache buster numbers (including question mark) and use this: &amp;{template:default} {{name=[x](<a href="https://files.d20.io/images/374971798/mIeNAfFktGOvtZmbOwqPFA/original.png" rel="nofollow">https://files.d20.io/images/374971798/mIeNAfFktGOvtZmbOwqPFA/original.png</a>)}}
You guys are awesome.&nbsp; Thanks so much for the help!&nbsp; It works!
1705077778
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
BTW, unless you are planning on adding more to this, none of that code is necessary. If all you want to do is display the graphic in chat, then you can just enter the raw URL, with or without extra numbers: <a href="https://files.d20.io/images/374971798/mIeNAfFktGOvtZmbOwqPFA/original.png?17050081885" rel="nofollow">https://files.d20.io/images/374971798/mIeNAfFktGOvtZmbOwqPFA/original.png?17050081885</a>