Difference between revisions of "Common:Adding Images to Templates"

From AgileApps Support Wiki
imported>Aeric
imported>Aeric
 
(4 intermediate revisions by the same user not shown)
Line 1: Line 1:
<noinclude>__NOINDEX__</noinclude>
<noinclude>__NOINDEX__</noinclude>
In HTML, an image is referenced using a tag that has the form: <tt><nowiki><image src="..."></nowiki></tt>, where the <tt>src</tt> attribute contains an absolute or relative path to the image. That path can be a file path like <tt>../images/local_image_file.jpg</tt> or it can be a URL of the form <tt><nowiki>http://...</nowiki></tt>.
In HTML, an image is referenced using a tag that has the form: <tt><nowiki><img src="..."></nowiki></tt>, where the <tt>src</tt> attribute contains the path to the image. That path <!--can be a file path like <tt>../images/local_image_file.jpg</tt> or it can--> must be a URL of the form <tt><nowiki>http://...</nowiki></tt>.


When the email arrives in a recipient's inbox, file paths are obviously of little value. (They would only work if recipient happened to have all of the right images at the right locations on their local system. Small chance!) So HTTP URLs are used to access the images.
Insert the URL into an <tt><nowiki><img src="..."></nowiki></tt> tag. The result is a tag of the form <tt><img src="{imageURL}/..."></tt>.
 
To get an image URL:
:* First upload the image to the platform as a [[Public Document]].<br>(URLs become available when files are made public.)
:* Then click the tilted "figure-8" icon on that page [[File:CopyShortURL.png]].<br>A dialog appears that shows the URL in a field. (The URL is already selected, to make it easier to copy.)
:* Copy the URL.<br>For example, by pressing Ctrl+c.
 
You can then insert the URL into an <tt><nowiki><image src="..."></nowiki></tt> tag. The result is tag of the form <tt><image src="{{platformURL}}/..."></tt>. That link then works in the recipient's email, because the image is publicly available on the platform.

Latest revision as of 22:33, 31 October 2014

In HTML, an image is referenced using a tag that has the form: <img src="...">, where the src attribute contains the path to the image. That path must be a URL of the form http://....

Insert the URL into an <img src="..."> tag. The result is a tag of the form <img src="{imageURL}/...">.