Mar 22, 2024 6:07 pm
I've spent a good hour trying to figure out why my images hosted on Google Drive stopped working with the image tag, so here is the solution in case anyone else ever has the same issue.
Apparently Google Drive changed its policies and with them the way links to files work. The new format for a direct link is this:
So an image with this share link:
https://drive.google.com/file/d/1PH-pgd2qCyiEv9cr1iVVDDnx6W0hmZSB/view?usp=sharing
becomes
https://drive.google.com/thumbnail?id=1PH-pgd2qCyiEv9cr1iVVDDnx6W0hmZSB&sz=w100
and results in
Credit to this article, it saved me the pain of guessing the new format. :'D
Apparently Google Drive changed its policies and with them the way links to files work. The new format for a direct link is this:
Quote:
https://drive.google.com/thumbnail?id=(image id)&sz=w(pixels)https://drive.google.com/file/d/1PH-pgd2qCyiEv9cr1iVVDDnx6W0hmZSB/view?usp=sharing
becomes
https://drive.google.com/thumbnail?id=1PH-pgd2qCyiEv9cr1iVVDDnx6W0hmZSB&sz=w100
and results in
Credit to this article, it saved me the pain of guessing the new format. :'D