If you are using #Excel365, you have the privilege of many powerful functions. IMAGE is one of them!
This function works like a charm with just one argument required. Think about a simple formula like this:
=IMAGE(A1)
It returns the image of the URL you put in cell A1. By default the size of the image returned fits the size of the cell it resides.

Isn’t it cool?
The syntax is simple:
=IMAGE(source, [alt_text], [sizing], [height], [width])
Only the first argument (source) is required. There are optional arguments mainly for more control of how the image will fit into the cell, which is illustrated in the next screenshot:

- The simplest form. The image fits the size of the cell, with the aspect ratio of the image preserved.
- By inputting 1 in the third argument, the image fills the cell, ignoring the aspect ratio.
- By inputting 2 in the third argument, the image’s original size is kept and it may exceed the cell boundary, like the screenshot above.
- By inputting 3 in the third argument and the height (in pixel) of the image in the forth argument, the image’s height is specified by your input while the aspect ratio is preserved.
- By inputting 3 in the third argument and the width (in pixel) of the image in the fifth argument, the image’s width is specified by your input while the aspect ratio is preserved.
- By inputting 3 in the third argument but omitting the forth or the fifth argument, it returns error.
Of course we can input a specific values to the height and width at the same time. However, this action will normally distort the original aspect ratio of the image and hence not recommended.
You may find more details about this function in MS documentation here, which I highly recommend you do so.
So far, the function seems perfect! The problem is… when we have many different URL images to return in a workbook, file size can be a problem. I tested on a workbook with 5000 images. I did this at work, sorry that can’t share that file. The file size was 12G!!!!! This is out of my expectation because I assume Excel retrieve the image on the fly.
One interesting observation is that, the image coming from the same URL seems not take extra space. You may download a sample workbook here to see. In the sample workbook, I have duplicated the same line to 1000+ rows. The file size increase was insignificant. It went from 365KB to 408KB.
If you know how to compress image size when using IMAGE function, please leave your comments. 🙌




i want to keep only the image, but when I break link, image vanish. How can I keep only image?
i tried paste special values also, but image vanished next day.
please share solutions.
LikeLike
You should hide instead of deleting the column that holds the URL. In case you must delete the cells with the URL, you can hardcode the URL in the IMAGE function.
LikeLike