Embeddable Images in Google Drive

Issue: “I am using a third-party web tool that allows me to add images, if I provide a URL for the image. If I grab a URL from another website, it works fine. But, I have some of my own images. I want to upload them to Google Drive and use them. But, when I set them to “Anyone with the link” and get the URL, they still don’t work. The third-party tool tells me it can’t use that URL. Can I use Google Drive to store those images?”

Yes, you can.

This post does a great job of explaining a manual process you can use for making this work.

But, I thought it might be fun to try to use the power of Google Sheets to do some of this work automatically.

I have created a Google Sheet (make your own copy) that speeds up that conversion time. Open the Sheet, paste in the URL you get from “Copy link” in Drive, and the next two columns will give you the URL to use in your third-party application, and a thumbnail version of the image! If you don’t get the thumbnail image, then the modified URL is not working.

The technical side:

The URL for a copied link will look something like this:
https://drive.google.com/file/d/1GTs8L7Pg2B83RubkGBBa1c0jGyzC6pT4/view?usp=sharing

The URL for the “embeddable” version of the same image will look something like this:
https://drive.google.com/uc?id=1GTs8L7Pg2B83RubkGBBa1c0jGyzC6pT4

The same “file id” string appears in both, so it was just a matter of extracting that text and inserting it in the proper place of the embeddable format. The power of Google Sheets does it for you!

So if you are using a web tool that offers the ability to embed content from a public URL, and you want to use your own Google Drive folder to store that content, make a copy of this Sheet and give this a shot!

Advertisement

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s