I'm trying to add an image to a velocity template in my plugin as described by atlassian here. I've added the web resource as so:
<web-resource key="navPics" name="navPics">
<resource type="download" name="defaultUserAvatar.png" location="com/onenetwork/servicedesk/testDashboard/images/defaultUserAvatar.png" />
</web-resource>
And reference it in the vm file like so:
$webResourceManager.requireResource("com.servicedesk.testDashboard:navPics")
<style>
#avatar_ONE {
url(defaultUserAvatar.png);
height: 24px;
width: 24px;
}
</style>
Yet nothing shows up. What have I done wrong?
For example, try this in your Velocity template file:
<img src="cid:${cid}" alt = "Foo">
Or in your Java code, try:
URL url = new URL("image.png");
String cid = email.embed(url, "Foo");
Map model = new HashMap();
model.put("cid", cid);
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.