Tutorial: Short Image URLs

From IdleRPG Wiki
Revision as of 14:26, 20 May 2020 by Chippy (talk | contribs) (add tutorial page: getting short image URLs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Some functions of the bot - for instance guild icons or pet images - require image URLs to be 60 characters in length. On this page you will learn how to get short URLs from image attachemtns and how to shorten long URLs.

I have an image, but no URL

This section covers having an image, but no URL at all.

Within the bot itself

To get a short image URL from a file, you can utilize the $imgur command. Simply attach the image to a message and write $imgur as the comment. The bot will provide you with a short image URL in a few seconds.

External services

Many services allow users to host images to shorten URLs, the most popular one being [imgur.com/ Imgur]. Visit [imgur.com/upload Imgur's upload page] and select the image you would like to use. After Imgur finished creating your post, you can right click/tap and hold the image and select "Copy Image URL". You will find a short image URL in the format https://i.imgur.com/6hgwDd7.png on your device's clipboard.

Manual file hosting

Do you have a VPS or dedicated server? Do you have your own file hosting service? Great! You can upload your files there and get your own custom URL too. Non-SSL connections to your service are allowed, if you don't have a certificate (yet).

I have an URL, but it is too long

This section covers long URLs and how to shorten them.

Within the bot itself

IdleRPG's $imgur command allows shortening long URLs as well. You can simply use $imgur https://long.url/123456789.png to get a short Imgur URL. (Please note that this link is just used for demonstration and does not exist). The requirement is that the link ends in .png, .jpg or .jpeg, GIFs are not supported.

External services

Many external services also support shortening image URLs, such as [imgur.com/ Imgur]. Visit [imgur.com/upload Imgur's upload page] and paste your long image URL into the URL field. After Imgur finished creating your post, you can right click/tap and hold the image and select "Copy Image URL". You will find a short image URL in the format https://i.imgur.com/6hgwDd7.png on your device's clipboard.