embed google drive images in sheets

How do you embed an image from Google Drive into a Google Sheets Spreadsheet?

You would have thought it would be a simple click of a button to embed an image stored on Google Drive into a Google Sheets spreadsheet. As you no doubt already know, it ain’t so. That’s why you’re here, right?

Don’t worry, it’s not terribly difficult. All it takes is one line of code and you’ll be able to display any Google Drive image inside any cell of a Google Sheets spreadsheet.

And here is that line of code:


Use the formula above and replace “shareable_link” with the shareable link from your desired image.

And that’s it! Pretty painless, eh?

Now you too can easily embed Google Drive images into any Google Sheets spreadsheet.

Thanks for reading! If you found this page useful, please share it!

42 thoughts on “How to embed Google Drive images in Google Sheets”

  1. Hi Lee,

    QQ- I use this method as well and it works great but, I had everything perfect on Friday the images were displaying and then this morning I opened my sheet and the URLs were still there but the images were not. Super odd. Do you know why this might happen? I had to re enter everything to get it back to normal.

    Thank you!

    1. Hmm, that is weird. I wonder if it timed out and the browser cached it or something. Either that or something changed in your Google Drive ecosystem that changed the shareable link (it is autogenerated after all), perhaps.

  2. I think there are several ways for this trick/hack to fail. The first is if you’re using a G Suite domain version of Sheets and the Admin has locked down your ability to share outside of your domain. So, some schools or businesses might have a problem using this. The primary requirement for images in cells to work is that the image is available on the web without a sign-in credential. If you can’t post images publicly, this method won’t work.

  3. I am unable to get this to work. I have tried it with both the formula in the cell and using the cell reference to another cell with the shareable link. This is a free Google account I use outside of my company’s domain so I can use the Google Suite. The formula is posted in cell if I click on it, but no picture appears. I would greatly appreciate any help you can give me on this.

        1. Nope. You can keep the spreadsheet as locked down as you like. The =IMAGE() function will allow you to use any image that is publicly viewable from the web.

          1. Ok, I’m 50% there. I cleared my cookies/history and tried from another computer. I can do it with pasting image share url directly to the pic cell.
            The reference formula still is giving me a run for my money. It has to be something so simple..

          2. Try taking the quotes off “F5”:

  4. I am trying
    with a totally public image and from my personal account but no photo is showing, can anyone help?

    1. Hi Becs, I worked out what’s going on. Google serves shareable links in two different formats. If you go to the Google Drive folder and right-click the item you want to put into the spreadsheet, then select “Get shareable link”, you will get a link that looks like:

      If you open the file and get the shareable link from there it will look like this:

      The first link is the one you want.

      You could adjust the formula to work with the other type of link by substituting “https://drive.google.com/file/d/” with “https://docs.google.com/uc?export=download&id=” and by removing “/view?usp=sharing”.

      1. It’s possible – likely, even – that Google has updated the product since this post was written.

  5. Thanks for this, works great.

    I have one slight problem with it though, the images i’ve embedded at 2:1 ratio. The images appear rotated to fit the ratio of the cell, for example a protrait image will be rotated 90 degrees, while a landscape image will be unrotated. Any idea whats up?


    1. Never seen that, to be honest. I wonder if it’s the result of an update to Google Sheets. I need to investigate.

  6. It is working for me apart from one thing: all of my images are showing with the short side horizontal, long side vertical, regardless of their orientation in the google drive. It’s not the end of the world but it’s not ideal for viewing the images. Is there a way to fix this? Thank you!

  7. So, I just cam upon this thread and am having an issue as a gsuite user. I am the domain admin and have checked to see if all sharing permissions are checked to allow to the public. I place the link above in with the drive url and all I get is a blank screen?

    1. I really need to try to find the time to update this thing! I appreciate your help with debugging!

  8. This method is working except for the all-are-landscape issue Michaela described. If you have a way around that I would be very happy! Using this to inventory our family heirlooms 🙂

    1. I know Google have extended the functionality here by adding operators that set the size and orientation – I haven’t really looked into it that hard yet though.

      They have also made some changes in the commercial GSuite product that could potentially have some weird effects too. One day I might get around to it!

    1. Check out the comments above. Lots has changed since I posted this. The other commenters have come up with some good suggestions.

  9. THANK YOU! You’re like an angel sent from heaven. This has been driving me mad. Works for me as is. WoopWoop

  10. Great!!!!!

    What a big headache you just took away from me!!!

    Thank you!

  11. Hi!!!

    I leave a tweak on your code.

    I need it to get a Form Publisher plugin to work (I have a Google Form which allows to upload a photo, and I want the photo to appear in the spreadsheet that is automatically created by the Form Publisher Plugin).

    But the link to the image created by the form is different from the one that you get in the “Get shareable link” in GDrive.

    So, here’s my solution (in Portugal, the formulas use ; instead of , ):
    =IMAGE(SUBSTITUTE(SUBSTITUTE(“image link from Form”;”https://drive.google.com/file/d/”;”https://docs.google.com/uc?export=download&id=”);”/view?usp=drivesdk”;””))

    Hope it can be useful!!!

  12. I want a way to show thumbnails of urls in my spread sheet which have come via url code from a google form response?

  13. Thanks mate!

    still don’t know why it won’t just work with the shareable link… but thanks to you, I don’t need to know that any more!


  14. Any resolution to the misaligned pictures appearing in the cells? Nothing I do seems to work.

    Also – for anybody having trouble with the picture appearing at all, I had that same problem and found a workaround by splitting the formulas up into different cells and offseting the cell containing the link that appears after a new response is uploaded. So my G11 is that cell

    F12 =offset(F12,-4,1)
    E12 =SUBSTITUTE(F12,”https://drive.google.com/open?id=”,”https://docs.google.com/uc?export=download&id=”)
    D12 =image(E12)

    Then I just link D12 to other sheets where I need it, which will always display the image associated with the latest response. Like I said, the original formula wasn’t generating any images for me until I broke it up into the format above, however, I still have no idea how to get these pictures to reliably stand up straight

  15. =IMAGE(SUBSTITUTE(FILTER(IMPORTRANGE(“10I0mKJ15Po_eJLnF9kljYOXFxDwdxTa8GsKShFG23UA/edit”,”Photo!C:C”),IMPORTRANGE(“10I0mKJ15Po_eJLnF9kljYOXFxDwdxTa8GsKShFG23UA/edit”,”Photo!A:A”)=$B$4),”https://drive.google.com/open?id=”,”https://docs.google.com/uc?export=download&id=”),2)

    I am using this formula for displaying images of a particular student depending on his roll number. but the function is not working

Leave a Reply

Your email address will not be published. Required fields are marked *

I accept that my given data and my IP address is sent to a server in the USA only for the purpose of spam prevention through the Akismet program.More information on Akismet and GDPR.

This site uses Akismet to reduce spam. Learn how your comment data is processed.