How to Hotlink Images from Google Drive and Dropbox
by JuanJuly 5, 2020 2 minutes • 241 words
Table of contents
In order to keep the Pantrypoints app resilient, it does not use image hosting which would increase the system’s cost and reduce maintainability. Instead, we use hotlinking which shows images hosted by other websites and apps.
There are generally two kinds of hosting services for image:
1. File hosting
These host files for storage purposes. Examples are:
2. Image hosting
These host images and video for serving over the internet, usually through a CDN (content delivery network). Examples are:
The easiest to use is Imgbb:
- Go to imgbb.com and upload your photo
- Choose
don't autodelete
- Choose
HTML thumbnail linked
then copy the url referenced by theimg
tag. In this case, it’shttps://i.ibb.co/jvpjXnp/sp.png
- Paste the link in image field in your Pantrypoints account or Item
But what if you already have files on Google Drive or Dropbox?
How to Hotlink from Google Drive
- In Google Drive, share the photo to anyone with the link. This will produce a url, for example:
https://drive.google.com/file/d/1jV8pJUdecO6g3Gemr_GPrHEFKVTMwC0d/view?usp=sharing`
- Get the ID which in this case is:
1jV8pJUdecO6g3Gemr_GPrHEFKVTMwC0d
- Put that ID to a new URL
https://drive.google.com/uc?id=
so that the whole URL will be:
https://drive.google.com/uc?id=1jV8pJUdecO6g3Gemr_GPrHEFKVTMwC0d
- Copy the link and post into your Pantrypoints Item or Account
How to Hotlink from Dropbox
- Get the link from your image in Dropbox. An example is:
https://www.dropbox.com/s/a6i8y0khkc4us8h/taonet512.png?dl=1
- Change the last characters from
dl=1
intoraw=1
https://www.dropbox.com/s/a6i8y0khkc4us8h/taonet512.png?raw=1
- Copy the link and post into your Pantrypoints Item or Account