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. }

27 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
  10. does it still limited bandwidth with this https://drive.google.com/uc?export=view&id= ?

    ReplyDelete
  11. Thanks for the tip. I use this approach quite often! So often that I created a really simple tool for that. Have a look here: http://blog.codeleak.pl/2016/01/generate-direct-link-to-google-drive.html

    Greetings!

    ReplyDelete
  12. It worked. But the image is too big, how can I make it fit the size given to it in my website. Thanks

    ReplyDelete
  13. Your website is really cool and this is a great inspiring article.
    selfie apps

    ReplyDelete
  14. Is there a way to post images to a forum or other site without editing tools showing up at the top? I've tried several but always get the same toolbar above the image - and it's active. Trying to get away from Picturetrail! Thanks -

    ReplyDelete
  15. BTW don't know why I show up as "unknown"! Thanks - Jim Sliff

    ReplyDelete
  16. Is there a way to do this for Google Photos? I'm trying to put Google Photos on a Google Map I'm making, but Maps won't see the URL shared out of Photos and finding the photo in Drive is just one extra step making this a long and tedious process.

    ReplyDelete
  17. I do this on videos it works!!,but suddenly it auto plays.
    Is there anyone here no how to disable it's autoplay?

    ReplyDelete

  18. Hyper songs download

    <a href="http://www.crazyspeedtech.com/download-voot-app-android-a

    ReplyDelete
  19. and with pdf to see them directly in the browser and not download?

    ReplyDelete