Numerous users have recently voiced their concern that images in Google Drive embedded HTML not working along the expected lines. As a result of which, all their photos and images dating back years are no longer accessible or visible. Not only that, some have even said that all their audio tags linking to Drive no longer play. So what’s Google’s stance on this matter and more importantly how to rectify this issue [if it is a bug in the first place!]? Let’s find out.
Why are Images in Google Drive Embedded HTML not working?
back in October last year, the Silicon Valley giant stated that starting January 2nd, 2024 the end users will use an iframe element to embed items that are stored in Google Drive on other web resources. In other words, Drive will start serving downloads without requiring third-party cookies that are embedded on third-party websites. Apart from that, it also laid out the recommended actions that should be taken by the users.
This involves using an iframe (HTML element that loads another HTML page within the document) on your website to load the content. You can do this by going to the file in Drive and taking the next relevant step:
- For Workspace files (Google Docs, Sheets, Slides, and Forms file types) use the Google Docs publishing URL of the file.
- For other files, once opened in Drive, select “Open in new window” from the overflow menu, and then open the overflow menu and select “Embed item…”, which provides the iframe HTML tag.
So can’t we simply use the aforementioned steps as recommended by Google? Well, we can, but there are quite a few caveats associated with it. For instance, iframe is not useful for images [for example: GIF files will not be displayed]. Moreover, the click-through to look at the large image will now take you to a Google Drive viewer, rather than another tab or to the direct image to load in the full browser window. So what else can be done? Let’s find out.
Fix Images in Google Drive Embedded HTML not working
As of now, the only workaround that is spelling out success for the users involves changing the uc?export=download&id= part of the embed code to thumbnail?id= Gif. Here’s an example of the same:
OLD LINE OF CODE: <img src="https://drive.google.com/uc?export=download&id=xyz" alt="Page Image"> NEW LINE OF CODE: <img src="https://drive.google.com/thumbnail?id=xyz" alt="Page Image">
However, there is a major issue with this fix. Since we are using the thumbnail in place of the actual image, the image quality will be drastically reduced. However, as of now, this is the only tweak that can address this issue of images in Google Drive embedded HTML not working, so we have no choice but to remain content with it, at least for now.
As far as the official stance on this matter is concerned, the developers are aware of this issue, but they haven’t given out any ETA for the rollout of a fix. As and when that happens, we will update this guide accordingly.