Search code examples
imagegoogle-sheetsarray-formulas

Can external links work correctly with array formulae?


I am creating a list of events. Each event has its own picture, held on an external site. The picture name (nnnn.jpg) is stored in a hidden column, in this case E.

I use this formula: =arrayformula(if(E2:E="",,image("http:// [url for remote folder] /"&E2:E,1)))

This should give all images. But instead most of the time it repeats the first image for all rows up to the end of the data. And some of the time it works correctly. I cannot detect the configurations in which it works and in which it doesn't, although I have tried.

Is there a fundamental problem with ARRAYFORMULA and external links?

I have tried this with several datasets. The 2022 data works perfectly, and the 2023 data seemed to work until I received a report of the issue less than a week ago. The more I tried, the less well it worked. Since the data was already public-facing, I have had to put a workaround in place.

What was I expecting? Each row (event) to list with the corresponding picture. Each picture to be fetched from its remote location to occupy column F in the sheet. Sometimes that happened. Increasingly, it did not and the picture in F2 became the picture for F2:F.

I can provide a silly sheet which demonstrates the point on three rows. The full data set can be over 700 rows.

Thank you.


Solution

  • There seems to be issues with ARRAYFORMULA(IMAGE()) right now.

    You can use MAP instead:

    =MAP(E2:E,LAMBDA(e,if(e="",,image("http:// [url for remote folder] /"&e,1))))