Put image in html that is in google drive

1

How to put the address of the google drive image in the src of an img? the folder is public (for everyone) and the generated link is this: link

I tried what you have in this response: Host images to a HTML in Google Drive , but it did not work.

    
asked by anonymous 21.06.2017 / 03:27

2 answers

2

I found a way: If you put the id of the image in this url, that's right:

link

the id of the image I got from the synaption link it generates:

link

end result:

link

    
21.06.2017 / 03:51
1

Good if image is alternating, it can be some kind if google security to protect files, that is if you want to use an image of the drive in your site google makes available informs iframes, which is not ideal for images. I'll upload the same photo to my drive for example.

After the upload I'll open it with 'google documents'

I already click on the documents in 'files' and then on 'publish to the web', I select the option incorporate and click on publish, result

<iframe src="https://docs.google.com/document/d/1or6gRFf8L9LyyqTHfTsqVKmKJGG1HfvqZMULY6oxIro/pub?embedded=true"></iframe>

Whatmakesnosense

ButwhengeneratingtheiframeIcameacrossanotherurlinit,whengoingtoityouwillseethephotoindocumentform,whenclickingonlyonthephototoopeninanewtabithasgeneratedanextensiveurl,whichcanbeimmutablebutIdonotknowforsure...

<img src="https://lh6.googleusercontent.com/6-VhBBB5rPL_zMXXcgidUmDUcfhzGvInaXJoktZE-1Lk0eDdNDkElcyqXGyr04p3NWyamDRloz_a73IjY3VDofxmY8EwjX9lwcX6EIcKZdb7NFkxu9ZW4SYqBR_6gqKgDvfZIAj6" >

However, unless it's a business rule, I do not recommend using images hosted on the drive.

    
21.06.2017 / 03:40