Embedding Images from Google Drive

via GoogleSystem

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.

Comments

Popular posts from this blog

Cannonball Tree!