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 <3
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.