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);
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.