Skip to content

Instantly share code, notes, and snippets.

@agam
Last active April 2, 2023 10:36
Show Gist options
  • Save agam/9a3b6a140cdba92bb9a6 to your computer and use it in GitHub Desktop.
Save agam/9a3b6a140cdba92bb9a6 to your computer and use it in GitHub Desktop.
Convert Google Drive url for Images to a URL that can be used as a Direct Link
  1. Upload image to Google Drive
  2. Make the image publicly shareable, and get the sharing URL
  3. The URL might be something like https://drive.google.com/file/d/foo
  4. Rewrite this to something like https://drive.google.com/uc?id=foo
  5. When you enter this link in the browser, you'll get another link, something with docs.googleusercontent.com in the URL
  6. Go ahead and embed this last link ...
@shafee-majeed
Copy link

Upto the 5th stage i have done it successfully but after that what should i do? I got the image link as docs.googleusercontent.com.

@RajatMujawar123
Copy link

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment