0

This is a code snippet from my .js project, which is being used in another .js, html & css file:

projects: [
    {
      image: "https://upload.wikimedia.org/wikipedia/commons/thumb/c/cb/Google_Assistant_logo.svg/1200px-Google_Assistant_logo.svg.png",
    },
    {
      image: "https://drive.google.com/file/d/17HUtCYyVrcnSHQrAEchacigQ5lInkocL/view?usp=sharing",
    }
  ]

The image on the first links works but the second (Google Drive) doesn't. There is no image shown for that link. I also tried a couple of image hosting websites but nothing seems to work. How can I get a correct link for other images? Is there any other place I can save my image except Google Drive?

x89
  • 2,798
  • 5
  • 46
  • 110
  • 2
    Does this answer your question? [Displaying files (e.g. images) stored in Google Drive on a website](https://stackoverflow.com/questions/10311092/displaying-files-e-g-images-stored-in-google-drive-on-a-website) – jmargolisvt Jan 01 '20 at 15:55
  • @jmargolisvt Actually it doesn't. I think these are outdated anyway. For instance, people have suggested to convert "open" in the link to "uc". But there's no "open" in links created by Google Drive anymore. Nevertheless, I found another way! – x89 Jan 01 '20 at 16:12
  • 1
    Since that other question has more votes/traffic, I think adding your updated answer to that question will help more people out in the long run. – jmargolisvt Jan 01 '20 at 16:18

1 Answers1

1
  1. Upload your picture to Google Drive and change the settings of your picture to public.

  2. Get its shareable link.

  3. Go to this website and generate a direct download link.

Worked for me!

x89
  • 2,798
  • 5
  • 46
  • 110
  • I also made a website for generating google links, you can plug in as many as you want, google automatically separates the string of links with commas. https://google-drive-link-generator.vercel.app/ – Jacob Broughton Apr 06 '21 at 12:27