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

Post an image to chat without macro asking for link?

So i'm making macros for spells, and I made small icons representing the element of the spells. However, the macro I'm using asks for the URL, even though it's in the macro itself. Here is the macro I use {{Type= [Image](?{Image URL|<a href="https://i.imgur.com/DDXZmwB.png" rel="nofollow">https://i.imgur.com/DDXZmwB.png</a>})}} I tried removing the question mark, but that just made it so the image doesn't show up, and just says image linking to the picture, not it showing up in chat. Since i'm going to be handing the spells out, i'd rather the URL part not show up every time. Is there a way to do this?
1557361655
GiGs
Pro
Sheet Author
API Scripter
The ?{ | } part is a query, and will always prompt you. Maybe it should be {{Type= [Image]( <a href="https://i.imgur.com/DDXZmwB.png" rel="nofollow">https://i.imgur.com/DDXZmwB.png</a>)} }
Ayy, thanks my dude
1557362727

Edited 1557366453
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
If you have&nbsp; type it a lot, you can just type it as: {{Type=&nbsp;[x](<a href="https://i.imgur.com/DDXZmwB.png" rel="nofollow">https://i.imgur.com/DDXZmwB.png</a>)}}
1557367225

Edited 1557367271
The Aaron
Roll20 Production Team
API Scripter
Also, note that if the image doesn't end in an image extension (.jpg, .png, etc), such as one on a service, you can append a URL fragment ending in an extension to get it to show up: [x](<a href="https://gph.is/2HPEMQz" rel="nofollow">https://gph.is/2HPEMQz</a> #.png ) It actually doesn't matter what extension you put on it as the browser will interpret it correctly, it's just so Roll20's parser will wrap it in an &lt;img /&gt; tag, instead of an &lt;a /&gt; anchor&nbsp; tag.&nbsp; Just always use #.png and you'll be fine (if you use something Roll20 doesn't match, it will still show as a link).
1557376228
Mike deBoston
Compendium Curator
FWIW, I've been storing my images in Dropbox. In Mac OS (there's probably a similar trick for Windows), I click on the file and select "Copy Dropbox Link". This gives me the url, only it has "?dl=1" at the end. I change that to "?raw=1#.png" and I'm good to go.