Displaying files (e.g. images) stored in Google Drive on a website

Solution 1:

A workaround is to get the fileId with Google Drive SDK API and then using this Url:

https://drive.google.com/uc?export=view&id={fileId}

That will be a permanent link to your file in Google Drive (image or anything else).

Note: this link seems to be subject to quotas. So not ideal for public/massive sharing.

Solution 2:

Here's the simple view link:

https://drive.google.com/uc?id=FILE_ID

e.g. https://drive.google.com/uc?id=0B9o1MNFt5ld1N3k1cm9tVnZxQjg

You can do the same for other file types, e.g. MP3, PDF, etc.

Solution 3:

UPDATE: As was announced, Google deprecated this feature in Aug 2016. Here's the final update from Google with alternatives.

Yes, it's possible. Provided that you put your files in a public folder, you can get any file in a folder by this URL:

https://googledrive.com/host/<folderID>/<filename>