Google-sheets – IMPORTRANGE + QUERY won’t import IMAGE

google sheetsgoogle-sheets-queryimportrange

I use Sheets in my business to create product catalogs for wholesale prices. I have different sheets for different companies but the data in many of them is the same. I'd like these sheets to sync from the main document. I've found a solution on here, however when I use the following function, the image imported in the main sheet using the IMAGE function doesn't get imported:

=QUERY(IMPORTRANGE("key","All!A2:M130"),"SELECT * WHERE Col1 contains 'Home&Beauty&Fashion'")

Is it possible at all?

Best Answer

This has nothing to do with ImportRange; the issue can be reproduced using Query within the same sheet. The documentation explains that Query only supports

boolean, numeric (including date/time types) or string values.

As far as Query is concerned, an image contained in a spreadsheet is simply a null value.

A workaround is to store URL strings themselves in the master sheet. These can be retrieved by Query, and then Image can be applied to the result.