Google Drive Embedded Images Not Displaying on Website
-
For the past few years, I’ve been successfully using the code
<img src="https://drive.google.com/uc?id=FILE ID"/>to embed images from Google Drive. However, suddenly, all the images have stopped displaying. Instead, there’s a tiny placeholder with a message stating, “This image has a missing alt attribute.”
I’ve tried various troubleshooting steps, including changing themes, updating WordPress, clearing cache, and disabling hotlink protection, but the problem persists. The images are set to “Anyone with the link can view” on Google Drive, and I’ve ensured that the alt attribute is correctly configured.
Please help me resolve this issue ASAPThe page I need help with: [log in to see the link]
-
All the Google Drive URLs are returning
403: Forbidden. That’s why the browser cannot display them: this has nothing to do with WordPress.It seems Google has changed something at their end, and those URLs no longer work.
https://wordpress.org/support/topic/audio-play-button-greyed-out-for-insert-from-url/
https://wordpress.org/support/topic/custom-html-widget-stopped-working-no-image-served/
Thank you so much for your reply. Do you think it’s worth considering Google Photos embeds instead? Curious if that might be a workaround for now.
FYI: Here’s a trouble ticket reported on Google’s own issue tracker about this
403: Forbiddenproblem for Google Drive links:https://issuetracker.google.com/issues/319531488
… with many people experiencing the same issue, some of whom aren’t even using WordPress at all.
Note that embedding Google Drive files using the iframe code provided by Google still works. It’s the undocumented direct linking hack you’re using — that has no official support — that’s what’s broken.
Same deal with Google Photos: the officially-supported way of embedding photos in your site (using the iframe code provided by Google) will always work. Any direct linking hack — could be broken anytime.
But, I’m genuinely curious: what’s wrong with uploading your site’s images to your own website?
The topic ‘Google Drive Embedded Images Not Displaying on Website’ is closed to new replies.
