<jinn:img/>Beautiful web pages load fast and when not fully loaded demonstrate the
structure that will exist when the page is complete. This isn't so easy when
the size of an image isn't known. Usually the browser will adjust the page as
it learns new information, but if you provide the size then this won't be
necessary. That's a nice idea, but who wants to go look up all the dimensions
for every image they will use in their site? The answer is nobody! For that
reason the <jinn:image/> tag comes in handy since if
you don't set the height or width attributes then they will be set for you when the page
is compiled. The following attributes are given special treatment via the
<jinn:image/> tag.
Set this attribute to the location of the image file. If the image path begins
with // then the image path will be considered
relative to the imageBase that you set in the
project configuration. If the path is preceded by / then the image will be retrieved relative to the
pageRoot that you set in the project
configuration. Last, if neither of the former two cases are true then the path
will be treated as relative to the current target page.
By setting this attribute to true then you are indicating that the image is not local and so no calculations on path relativity or image dimensions will be made.
Other than these attributes you may use any other attributes found in the HTML
description for the <img /> tag. It is
also worthwhile to mention that if you do not set an alt tag then one will be set for you containing an empty string.
<jinn:image source="//logo.png" alt="Corporate Logo"/>