Host images to an HTML in Google Drive

2

I have a simple question, but I still have not found the exact reference to solve it. I just know there's a possibility.

I want to host an image for an HTML in Google Drive to be accessible by the URL. So, my HTML will look something like this:

<img src="Url_Google_Drive" alt="example">
  

URL would be something like this: link

However, using the URL generated on the google drive share does not exactly work when loading HTML.

I know I have a parameter (probably 'open?') in the URL that should be changed to work correctly but I did not find which parameter is.

Would you please let me know?

    
asked by anonymous 04.01.2017 / 14:48

2 answers

2

I got a very simple solution to host images in Google Drive for some HTML. A very simple way to do this is:

1st - Check your folder where the images in Google Drive will be as Public (Share = > Advanced Settings)
2º - Use the generated image sharing link (on enable link sharing)
3rd - In your html SRC <img> use the share URL generated by Google Drive
4º - In the url, change the excerpt 'open?' by 'uc?'

Ready. Simple and functional.

I left the question here to help colleagues ...

    
04.01.2017 / 15:04
-1

An image generated in google drive, generates a link

https://lh5.googleusercontent.com/id_da_imagem

But to get this link is a bit complicated, you need to go into share, and click Get shareable link and right click on the image and copy the image address.

You can use the image in html src, I do not know if it is viable.

    
04.01.2017 / 14:57