Insert an Image from Google Drive

To insert an image from Google Drive into a cell using the IMAGE function, the first step is to share the image from Google Drive (right-click > Share > Share).

Next, copy the image link (from the share window or right-click > Share > Copy link):

https://drive.google.com/file/d/1hT4pa6lfGHEVM4ndqEypsqOz5cD31hNd/view?usp=sharing

Insert the Image

If you enter this URL in the image function, it won’t work:

google sheets function image drive png insert

The issue is that this link doesn’t point directly to the image but to a webpage displaying the image, so it’s not an image URL.

To insert this Google Drive image, you need to use a URL in this format:

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

Simply replace IMAGE_ID with the image ID (in this case 1hT4pa6lfGHEVM4ndqEypsqOz5cD31hNd, found in the share link):

https://drive.google.com/uc?id=1hT4pa6lfGHEVM4ndqEypsqOz5cD31hNd

The IMAGE function now displays the image correctly:

google sheets function image url drive insert

=IMAGE("https://drive.google.com/uc?id=1hT4pa6lfGHEVM4ndqEypsqOz5cD31hNd")