How do I display images from Google Drive on a website?

前端 未结 17 1949
傲寒
傲寒 2020-12-02 05:35

A client of mine has uploaded some photos to their Google Drive and would like me to display their photos on their company website. I reviewed the documentation for displayi

17条回答
  •  轻奢々
    轻奢々 (楼主)
    2020-12-02 06:22

    If you have some image files, just upload them to a public folder on your Google Drive, copy its folder ID from the address bar (e.g. 0B0Gi4v5omoZUVXhCT2kta1l0ZG8) and paste it into a form at GDrives, then choose your own alias (e.g. myimgs) and voila! You can access the images one by one using e.g. http://gdriv.es/myimgs/myimage.jpg.

    If you want to embed a whole folder on your website (in a frame), you can use one of the following URLs, replacing [folderID] with your own ID:

    • http://gdriv.es/myimgs/
    • https://docs.google.com/folder/d/[folderID]/preview?rm=minimal
    • https://drive.google.com/folderview?id=[folderID]

    If you prefer to get the file list in XML or JSON, you can use YQL.

    Note: You can use Google+ Photos to host ans embed your images as well.

提交回复
热议问题