An unofficial blog that watches Google's attempts to move your operating system online since 2005. Not affiliated with Google.

Send your tips to gostips@gmail.com.

February 8, 2013

Permalinks for Google Drive Images

While Google Drive lets you upload any file, the support for files that can't be edited using Google Docs/Sheets/Slides is limited. For example, you can embed PDF files and videos, but Google doesn't offer permalinks for images.

So you've uploaded a photo to Google Drive and the only options are to download the file and link to the image page. But what if you want to embed that image in a web page or simply post a direct link to the image? You may think that right-clicking the image lets you copy the image URL, but that's not true. Even if you check the source code of a page or use features like Firefox's "view page info", you'll get a link that doesn't work.

Fortunately, there's an easy solution - replace this URL from the address bar:

http://docs.google.com/file/d/FILEID/edit

with:

http://drive.google.com/uc?export=view&id=FILEID

(where FILEID is a long sequence of digits and letters).

This only works if you've changed the visibility options to "public on the Web" or "anyone with the link" in the Share dialog.

Here's an example:


You can also use:

http://drive.google.com/uc?export=download&id=FILEID

to trigger a download and this works for any non-private Google Drive file, not just for images.

{ via Stack Overflow. Photo licensed as Creative Commons Attribution. }

14 comments:

  1. Copy Link Address and Copy Download Address should be menu options for selected files. All these hacky methods of doing what the UI should be providing are poor substitutes.

    ReplyDelete
  2. Funny thing but this image doesn't work.

    ReplyDelete
    Replies
    1. Try enabling third-party cookies (they're disabled by default in Safari, including the mobile Safari for iOS and all the other iOS browsers).

      Delete
  3. Could this be used to host podcast MP3 files? iTunes still requires an old fashioned file server...

    ReplyDelete
    Replies
    1. It should work for mp3 files, as well.

      Delete
    2. I heard on the forums that there's an invisible cap on bandwidth- they said that they wanted docs to be used for sharing, not hosting. Do you have any information about that? Because if it's gone, it'd save a lot of podcasters a lot of money ;)

      Delete
  4. Alex Chitu, thanks. What else are the settings?



    My script https://sites.google.com/site/oshliaer/getgddlink

    ReplyDelete
  5. Good image choice, Ionut ;-) #platypus

    ReplyDelete
  6. Thats Great blog :)
    my blog abuot lower back pain
    https://lower-backpain.blogspot.com

    ReplyDelete
  7. Most Expensive Cars in the World, Top Concept Cars, Top Strange Vehicles in the World and Car latest hot top Wallpapers
    worldlatestvehicles.blogspot.com

    ReplyDelete
  8. Nice tutorials. I didn't know about this, so gonna try.
    Oh by the way, hope we can be blogger friends at my inspirational Christian quotes blog.But, It is ok if you don't mind. Good luck.

    ReplyDelete
  9. Why does it have to be this convoluted?

    ReplyDelete