Host Content In Google Drive & Link To It From Your Website
So for some time now, I’ve been wondering why Google have made it so impossible to just link to files hosted in your Google Drive folders. Simply embedding images on pages of your website that you can save in your own publicly shared Drive folders is just common sense but as far as I can tell, Google have not only removed features that made this half do-able but it seems are purposely not providing this ability.
This alone, will always put Dropbox way ahead of them in terms of use and flexibility.
That being said, after doing some digging, I eventually managed to find a way of inserting images on web pages that were hosted in my Google Drive and here is how:-
Ensure that your Google Drive folder where you will be saving the images is shareable (simply right mouse click on the folder and click ‘Share…’ – then make sure anyone can access, more info).
You then need to obtain the Google Drive ID of the image file you want to use on your website.
To embed/insert an image onto a webpage, use the following (replacing FILEID with the ID):-
http://drive.google.com/uc?export=view&id=FILEID
To provide a download link of your image, use the following (replacing FILEID with the ID):-
http://drive.google.com/uc?export=download&id=FILEID
For example, if you wanted to insert this picture of these Power Rangers kittens…
The code would look like this in your web page:-
<img src="http://drive.google.com/uc?export=view&id=0B5cTUDO-xB5CaHJfeGs0dTFRZ0E" alt="Power Rangers Kittens" />