IMAGE Function – Google Sheets

The IMAGE function lets a spreadsheet user insert an image into a cell. The source of the image is specified as a URL.



  • url – The location of the image on the web – (“”). You must either use quotation marks around the URL or put it in another cell and reference it.
  • [mode] – Optional specification of how to size the image.
    • 1 – Resize to fit the cell. Maintains the same aspect ratio so the image does not look distorted.
    • 2 – Makes the image fit the entire cell. Will disregard the aspect ratio.
    • 3 – Maintains original size even it gets cropped.
    • 4 – Custom
  • [height] – If you specify 4 for custom mode, use this for the height.
  • [width] – If you specify 4 for custom mode, use this for the width.


#N/A – Not enough arguments. Possibly because you used option #4 but did not specify height and width.


 Live examples in Sheets

Go to this spreadsheet for examples of the IMAGE function shown above that you can study and use anywhere you would like.

0 thoughts on “IMAGE Function – Google Sheets

  • Based on a number in a cell (0-9) I want to display a particular image in another cell.
    Your example only shows if a number is higher or lower than a particular number.
    Can you expand beyond two image location references to ten in my case?
    Any help would be much appreciated

  • Hello,

    I have images saved on my google drive that I’d like to use an =IF(A2>=B2,IMAGE(“URL”),””) function on a google sheet.

    Is there a way I can link this cell to images saved in google drive? Or how would I go about linking these custom images?

    Thank you!

    • Adam Steinfurth says:

      I doubt it would work or if it did, it may stop working later. If you want to try it, maybe try the share functionality, get shareable link, make it public, and let us know how it goes.

  • Hi, I would like to know if the image formula still working on… my cell with this formula is about a half has no picture in it… but the url is good if I just type it in chrome, thanks!

      • Does it download and put it in the sheets or does it fetch the image from the URL everytime you open the sheet? I’m using an API to get an image but the image would change depending upon when I make the request

        • Flynn O'Meara says:

          I’ve wanted to know this also so did some testing:
          The image is cached for roughly 5 minutes when the function is used.
          Reloading the Sheet in this timeframe will still show the original image, even if the source URL’s file has been changed or deleted.

          After a few minutes, reloading the Sheet will fetch the image from the remote host again.

          For practical purposes, I’d consider it to fetch the image from the URL every time.

Leave a Reply

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

You may use these HTML tags and attributes:

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>