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

Get image URL?

Hi guys, I'm lost on how I can find a image URL in the new library structure. I find lots of pics under the sources tab in the Developers Console but I don't know how to sort them or look for what I want. In this case it's some new blood splatters from Gabriel Picards new Gore pack. I have copied them to my library but after that I'm stumped. Anyone willing to help?
1476294623

Edited 1476294671
Lithl
Pro
Sheet Author
API Scripter
When I need a url for a script, I just create a small script to grab it for me. Something like: on('add:graphic', function(obj) { log(obj.get('imgsrc')); }); When you drop an image on the table, the image's url will be spit out into the API console.
Hi Brian,  I'm afraid that scripting is way out of my league. :) I think it used to be much easier to find the link to the images using the console, so easy that even I could do it. I have added a lot of nice graphics to the Blood Spatter Script and never had any problem until now.
1476295252

Edited 1476295473
Ada L.
Marketplace Creator
Sheet Author
API Scripter
Here's a quick script that will print out the image URLs of the selected tokens to the chat. (() => {     var CMD = '!GetTokenUrl';          on('chat:message', msg => {         if(msg.content === CMD && msg.selected.length > 0) {             var urls = _.map(msg.selected, selected => {                 var token = getObj('graphic', selected._id);                 return token.get('imgsrc');             });                          sendChat('GET TOKEN URLs', urls.join('<br/><br/>'));         }     }); })(); Just select the tokens with the graphics you want and enter !GetTokenUrl in the chat.
1476297299

Edited 1476297720
Ravenknight
KS Backer
Thank you Stephen! Just what I needed. :) Happy rolling guys,
1476297942
Ada L.
Marketplace Creator
Sheet Author
API Scripter
Glad to help.