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 .
×
May your rolls be merry + bright! 🎄
Create a free account

How do you get portable icons to be used in public scripts?

1485385877
Chris D.
Pro
Sheet Author
API Scripter
Compendium Curator
I am working on modifying the TrackerJacker script to add a lot of capability. I am also changing the name and the icon. The problem with working with somebody elses code is trying to change something that you are not sure how they did it.&nbsp; The code has two images hardcoded into the script file &nbsp;feedbackImg: '<a href="https://s3.amazonaws.com/files.d20.io/images/11514664/jfQMTRqrT75QfmaD98BQMQ/thumb.png?1439491849" rel="nofollow">https://s3.amazonaws.com/files.d20.io/images/11514664/jfQMTRqrT75QfmaD98BQMQ/thumb.png?1439491849</a>', &nbsp;trackerImg: '<a href="https://s3.amazonaws.com/files.d20.io/images/11920268/i0nMbVlxQLNMiO12gW9h3g/thumb.png?1440939062" rel="nofollow">https://s3.amazonaws.com/files.d20.io/images/11920268/i0nMbVlxQLNMiO12gW9h3g/thumb.png?1440939062</a>', Now when I loaded the script it just worked, even though my understanding is that the developer of TrackerJacker no longer has a roll20 account, the images are still loaded and available. Not sure why. Now I saw the place in API:Objects where it says You must use an image file that has been uploaded to your Roll20 Library -- not an external site (such as Imgur), and not the Roll20 Marketplace. It will begin with '<a href="https://s3.amazonaws.com/files.d20.io/images/" rel="nofollow">https://s3.amazonaws.com/files.d20.io/images/</a>' for images uploaded to the Main server, So I loaded the icon I want as a token, looked at the imgsrc, changed the med.png to a thumb.png, and it seems to be working.&nbsp; Is that the recommended way? If I delete the token the image was made from, and I distribute the script so many people are using it, can everybody use this image and can I be confident it will remain available more or less forever? Thanks
1485388272

Edited 1485388280
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
As long as that image is in your library, you're good to go. You could also upload the image to the script's folder in the repository and reference it there.
1485395876
The Aaron
Pro
API Scripter
If you are putting images in the chat, you can upload them the API repo with your script. &nbsp;However, if you are creating graphic objects on the map, they MUST be in a Roll20 User Library. &nbsp;You'll want to tag them and name them well so you don't accidentally erase them and break every copy of your script out there.
1485396605
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
The Aaron said: If you are putting images in the chat, you can upload them the API repo with your script. &nbsp;However, if you are creating graphic objects on the map, they MUST be in a Roll20 User Library. &nbsp;You'll want to tag them and name them well so you don't accidentally erase them and break every copy of your script out there. Ah, thanks for correcting me Aaron
1485398724
Chris D.
Pro
Sheet Author
API Scripter
Compendium Curator
OK, so once again, the Trackerjack icon (hornet) was probably uploaded by Ken L, who I hear has not had an account here for 2 years.&nbsp; Why am I and everybody else able to find the hornet where he said it is? And while I can add it to the github repository, how would I reference it from the script? Like I said, I figured out how to reference it when it is in my library. And so long as I keep it in my library forever, I guess everybodies copy can use it.&nbsp;
1485399315

Edited 1485399470
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
You can probably still find it where he said it was because he probably didn't delete his account, just canceled his subscription. Your assets stay in your library even if you later decrease the size of your allotted storage. as for referencing it elsewhere, it's just like any other web address. So to reference the preview image of the OGL sheet in the repository, the address would be: <a href="https://github.com/Roll20/roll20-character-sheets/blob/master/5th%20Edition%20OGL%20by%20Roll20/5th%20Edition%20OGL%20by%20Roll20.png" rel="nofollow">https://github.com/Roll20/roll20-character-sheets/blob/master/5th%20Edition%20OGL%20by%20Roll20/5th%20Edition%20OGL%20by%20Roll20.png</a>
1485416057
Chris D.
Pro
Sheet Author
API Scripter
Compendium Curator
OK, I guess I was worrying about nothing. &nbsp; Thanks.&nbsp;
1485539330
Lithl
Pro
Sheet Author
API Scripter
Chris D. said: Now I saw the place in API:Objects where it says You must use an image file that has been uploaded to your Roll20 Library -- not an external site (such as Imgur), and not the Roll20 Marketplace. It will begin with ' <a href="https://s3.amazonaws.com/files.d20.io/images/" rel="nofollow">https://s3.amazonaws.com/files.d20.io/images/</a> ' for images uploaded to the Main server, This should actually be "uploaded to a &nbsp;Roll20 library". There is no check in place to ensure it's coming from your own library. So long as the library asset isn't deleted, the scripts using it will continue to function.