Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

How to display image from server in velocity template?

Tomasz Kustrzynski April 26, 2015

Docs on downloadable plugin resources give an example of gif image.

<resource type="download" name="aimon.gif" location="templates/extra/impresence/aimon.gif">
   <param name="content-type" value="image/gif"/>
</resource>

How would I use aimon.gif in a velocity template? <img src="aimon.gif"/> doesn't work (it would in CSS template though - another example from that documentation). I tried several permutations of local/absolute paths in velocity but none of this worked.

cheers,

1 answer

1 accepted

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

0 votes
Answer accepted
Volodymyr Krupach
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
April 26, 2015

Hi Tomek!

You map image directly and I guess you need to provide direct path to it:

&lt;img src="$baseurl/download/resources/YOUR-PLUGIN-KEY:YOUR-WEB-RESOURCE-KEY/aimon.gif" /&gt;

Please see here for more info: https://answers.atlassian.com/questions/79363

Tomasz Kustrzynski April 26, 2015

Thanks Volodymyr. Makes perfect sense.

TAGS
AUG Leaders

Atlassian Community Events