Google Sheet can't show Image from Google Drive

Hello there!

I have Google Sheet where I have images from Google Drive stored like this:

 

 

 

=IMAGE("http://drive.google.com/uc?export=view&id={my_image_id}", 4, 240, 320)

 

 

 

And everything works fine till today (13/02/2024). Changing export=view to export=download don't do anything at all. And now I have 404 error in Network from this API:

 

 

 

https://lh3.googleusercontent.com/docsubipk/{some_uuid}=s320-w320-h239-s

 

 

 

Screenshot 2024-02-13 at 10.56.32.png

Is anyone have any solution for this? 

 

Solved Solved
0 4 2,342
1 ACCEPTED SOLUTION

@artems & @icrew 

Google has really messed up this change, but let me summarise for you:

Google says it announced this way back in October 2023 - see: 

Why do I claim that Google has really messed this up?  Well if you take the time to read the article linked to above the astute among you will spot that the article literally makes no reference whatsoever to images in Drive or the http://drive.google.com/uc URLs, so, surprise, no one realised that those URLs or images (or downloading files for instance, would be affected by the change, because Google didn't specifically say so.  As you can see from the announcement that this would come into affect 02 January 2024 so lots of people raised an issue in Google's Issue Tracker - see:

The key takeaway from that issue report is the definitive response from Google in comment 175 which I will quote here to ensure everyone can see it.

jp...@google.com<jp...@google.com> #175

 
Status: Won't Fix (Intended Behavior)
 
Closing this issue as working as intended. I tried to buy some more time with team owning this to no avail. Some points:
  • Related to phase out of third party cookies. October 2023 Blog Post
  • This was never an officially supported usage. (Same for lh3.google.com, thumbnail links mentioned above, etc)

As to options going forward:

  • Use the embed pattern described in the above blog post or here
  • Move files to a location designed for hosting, e.g. Google Cloud Storage or any number of hosting providers for static content
  • Proxy the files through the Google Drive API using your own infrastructure, e.g. Google Cloud Functions, watch out for egress costs and hot linking, probably want a CDN too
  • Use a hosted proxy service as mentioned above
Assigned      Won't Fix (Intended Behavior)
      
 
This will never work again for you so you need to find a different approach.  As you can see Google has had to do some backpedaling because AppSheet is getting  a special exemption until 01 May 2024 (presumably there was an AppSheet help article suggesting to do this, so it was mentioned by Google as a way of getting images)
 

Dear Google AppSheet Customer,

Starting January 2, 2024, Google Drive began changing how it serves and downloads some of its content. As a result of these changes, please ensure that your AppSheet apps do not use Google Drive’s download URLs by May 1, 2024.

What do you need to know?

This change impacts how files and images hosted on Google Drive can be accessed, including how AppSheet apps can access and serve images and other files to app users. Please note that your files will not be impacted and will not require modification.

After this change, AppSheet apps using Google Drive’s download URLs (for example, "drive.google.com/uc?export=view&id=File_ID"), will no longer display the corresponding content to the end users.

Here are examples of instances where you might be using these URLs:

  • In your app definition - either by specifying such a link directly or through an expression creating such a URL.
  • In your data sources - for example, Google Sheets and Cloud SQL.

AppSheet and Google Drive are working together to temporarily allow AppSheet to display images and other content served via Google Drive’s download URLs until May 1, 2024.

 
We took the approach to get the thumbnailLink that the Drive API provides to access the thumbnails but be aware that it's only a temporary URL that lasts for a couple of hours, so in AppSheet we made a bot to retrieve them every so often.

 

 

 

View solution in original post

4 REPLIES 4

A clarifying question:

1) are you able to access the URL

http://drive.google.com/uc?export=view&id={my_image_id}

outside of Sheets (by just pasting it into your browser)?

2) Are you able to see/access the file normally via the Drive interface, like https://drive.google.com/file/d/{my file id}/view ?

Cheers,

Ian

Sure, it's working both ways just fine, issue is only in sheet. And it's worked just fine yesterday and I didn't change anything, thats what curious 

@artems & @icrew 

Google has really messed up this change, but let me summarise for you:

Google says it announced this way back in October 2023 - see: 

Why do I claim that Google has really messed this up?  Well if you take the time to read the article linked to above the astute among you will spot that the article literally makes no reference whatsoever to images in Drive or the http://drive.google.com/uc URLs, so, surprise, no one realised that those URLs or images (or downloading files for instance, would be affected by the change, because Google didn't specifically say so.  As you can see from the announcement that this would come into affect 02 January 2024 so lots of people raised an issue in Google's Issue Tracker - see:

The key takeaway from that issue report is the definitive response from Google in comment 175 which I will quote here to ensure everyone can see it.

jp...@google.com<jp...@google.com> #175

 
Status: Won't Fix (Intended Behavior)
 
Closing this issue as working as intended. I tried to buy some more time with team owning this to no avail. Some points:
  • Related to phase out of third party cookies. October 2023 Blog Post
  • This was never an officially supported usage. (Same for lh3.google.com, thumbnail links mentioned above, etc)

As to options going forward:

  • Use the embed pattern described in the above blog post or here
  • Move files to a location designed for hosting, e.g. Google Cloud Storage or any number of hosting providers for static content
  • Proxy the files through the Google Drive API using your own infrastructure, e.g. Google Cloud Functions, watch out for egress costs and hot linking, probably want a CDN too
  • Use a hosted proxy service as mentioned above
Assigned      Won't Fix (Intended Behavior)
      
 
This will never work again for you so you need to find a different approach.  As you can see Google has had to do some backpedaling because AppSheet is getting  a special exemption until 01 May 2024 (presumably there was an AppSheet help article suggesting to do this, so it was mentioned by Google as a way of getting images)
 

Dear Google AppSheet Customer,

Starting January 2, 2024, Google Drive began changing how it serves and downloads some of its content. As a result of these changes, please ensure that your AppSheet apps do not use Google Drive’s download URLs by May 1, 2024.

What do you need to know?

This change impacts how files and images hosted on Google Drive can be accessed, including how AppSheet apps can access and serve images and other files to app users. Please note that your files will not be impacted and will not require modification.

After this change, AppSheet apps using Google Drive’s download URLs (for example, "drive.google.com/uc?export=view&id=File_ID"), will no longer display the corresponding content to the end users.

Here are examples of instances where you might be using these URLs:

  • In your app definition - either by specifying such a link directly or through an expression creating such a URL.
  • In your data sources - for example, Google Sheets and Cloud SQL.

AppSheet and Google Drive are working together to temporarily allow AppSheet to display images and other content served via Google Drive’s download URLs until May 1, 2024.

 
We took the approach to get the thumbnailLink that the Drive API provides to access the thumbnails but be aware that it's only a temporary URL that lasts for a couple of hours, so in AppSheet we made a bot to retrieve them every so often.

 

 

 

Thx a lot for this, you saved me a lot of time! Now I need to change things in my code...

Top Solution Authors