Reputation: 57
I am tried to show an image using google docs. But it does not work for image. But it perfectly work for pdf and doc files.
My code is given below.
<iframe id="iframe_certificate" class="iframe_show" src="http://docs.google.com/viewer?url=http://fireandsafetyforum.net/LMS/director/images/test.jpg&embedded=true"></iframe>
Upvotes: 5
Views: 2778
Reputation: 1227
Google Docs' doesn't host (its an editing program), Google Drive does (its storage).
There are two requirements to publish content from Google Drive: 1. the folder is made public; 2. a webViewLink URL is created for the content.
See: https://developers.google.com/drive/web/publish-site
Your source doesn't look like the URL example given. It looks like it might be a rendering of the relevant file (not the file) in Google Docs.
If you haven't done so, I suggest you use above page to make sure the relevant file is made public and given a proper URL.
Upvotes: 1