Hello everyone,
So I'm trying to add a local image, in src/main/resources/images/piechart.png to my vm file. In my atlassian-plugin.xml, I've added it as a resource.
<web-resource key="security-service-resources-${timestamp}" name="security-service Web Resources"> <resource type="download" name="piechart.png" location="images/piechart.png" /> <context>security-service</context> </web-resource>
$webResourceManager.requireResourcesForContext("security-service")
<img src="$req.contextPath/download/resources/com.companyname.jira.plugin.security-service:security-service-resources-${timestamp}/images/piechart.png" alt="piechart">
https://companyname.com/jira/download/resources/com.companyname.jira.plugin.security-service:security-service-resources-${timestamp}/images/piechart.png
Hi Youssef Bouchara and welcome,
For this kind of questions exists a separate forum where developers can catch up together.Have you tried at https://community.developer.atlassian.com/ already?
Regarding your questions is mostly answered already here:https://community.atlassian.com/t5/Answers-Developer-Questions/Referencing-images-from-decorator-or-css-in-theme-plugin/qaq-p/479052
Probably if you dont want to use CSS but the direct link in your decorator instead, you may disable batched mode first as explained at:https://developer.atlassian.com/server/jira/platform/web-resource/Did my answer solve your problem? If so, consider to mark this as an accepted answer.
Best Regards
It looks like you're new here. Sign in or register to get started.