The images must be available online and reachable with the “https://” protocol.
Download the worksheet (link at top) to follow along.
See below for examples.
Example - Source path only
IMAGE returns an image directly to a cell.
Essentially, the first edge to touch a cell boundary limits how far the image will expand.
Vertical alignment is set to “Middle”, and Horizontal alignment is set to “Center”.
We have also set the row height to 30 (40 pixels).
This creates the feeling of some white space padding around the flags.
Note that sizingmustbe set to 3 before IMAGE will accept a customheightorwidth.
In the worksheet example, all flag images follow the same pattern.
We have also added code to generatealt_textin the form of “Flag of Canada” for each flag image.
Image caching
One quirk of the IMAGE function is that itcachesthe images it fetches inside the worksheet.
Instead, it doggedly returns the old (cached) image.
If you know a better way, kindly let me know.