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

Is it possible get resource image url in vm or javascript file?

S R February 26, 2013

Is it possible get resource image url in javascript file?

I know how it works in css.

Like in css:

.myclass {

background: url("images/myimage.png")

}

But how can I access to image in vm or js file?

src="images/myimage.png" doesn't work

1 answer

1 accepted

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

3 votes
Answer accepted
EddieW
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.
March 9, 2013

This is answered else where on the site.

https://answers.atlassian.com/questions/48053/referencing-images-from-decorator-or-css-in-theme-plugin

Quoting from Joseph Clark's answer there:

<img src="$req.contextPath/download/resources/my.plugin.key:my-module-key/path/to/image.png">

TAGS
AUG Leaders

Atlassian Community Events