Was setting up a carousal,
but fancybox not loading gdrive image file link
<a data-fancybox="gallery1" href="https://drive.google.com/file/d/<file id>/view?usp=sharing"><a>
any idea why,
does fancybox have any access issues with drive files
thumbnails working though
tried gdrive preview links. still meh
2
Answers
The link you are using doesn’t look correct.
You seem to be using the link given by the "get link" drive function, which is not a link to the actual image and doesn’t work for embedding.
You can get an embed element from drive.
You also have to make sure the image is shared to the public.
The link returned in the element comes out with this format:
https://drive.google.com/file/d/FILE_ID/preview
This is the recommended method for embedding according to this blogpost
You could also get a file’s web content link via the Drive API but it’s more of a hastle.
If you want to display your link inside the iframe, then follow the documentation and create links like this: