Get Shift Done: Tips and Tricks
You may already know that Google Sheets can insert images into the document using the “Insert Image” option, but it has limitations. In particular, you cannot control the display very well, and the image shows above the cells in the document.
Instead, by using the =IMAGE formula in Google Sheets, you easily can add images within the cell and managing how the image sizes.
Let’s say we have a series of photographs from a recent trip that we’d like to manage. We want to capture each image’s unique date, where the photo was taken, and notes about its purpose. By using the =IMAGE spreadsheet formula, we can display each image in a cell, as well as organize the other information in the rest of the row.
The image always stays within the cell, no matter what size or mode you specify, so before adding your image adjust the row height and column width .
The formula for inserting the image is straightforward. However, Google Sheets has many options on how the image should fit within the cell, plus an additional sizing option.
There are three different ways in which you can add the image:
- Simply add the image and do not specify mode or size:
- Add the image and specify the mode but not the size:
- Add the image, specify the mode, and the size in pixels width first then height separated by commas as well
=IMAGE(“http://themisadventuresofjenn.com/wp-content/gallery-bank/gallery-uploads/o_1a5j5e6er1jph1g741eb51gn513r79c.jpg", 1, 200, 150)
Enclose the URL of the image in quotes; otherwise you will most likely see an error.
When deciding how your image will fit within the cell, there are four modes to choose from:
- 1 resizes the image to fit within the cell and maintain the aspect ratio.
- 2 stretches the image or compresses it to fit inside the cell; it ignores the aspect ratio.
- 3 leaves the image at original size. The overflow crops off.
- 4 allows you to specify the image’s width and height.
The width and height specification is completely optional. Start with the height you would like the image to appear in the cell, and then add the width after the comma.
In the example shown above, I used just the image URL and the mode 1 resizing the image to the cell and maintaining the aspect ratio.
You can play around with different combinations until you get the image to display nicely within your Google Sheet.
Get stories like this one delivered to your in-box weekly: Subscribe to the GSD newsletter.
GSD: Tips and Tricks is brought to you by Xero, the cloud accounting software solution for your small business. With Xero, you can log in anytime, anywhere to get a real-time view of your cash flow and manage your books. Start your free 30-day trial today.