Kindly try the following approach. I tested it and the images were loaded accordingly. In your sample, the image data is not yet loaded, hence, I passed an InputStream parameter to the AvataterManager#create.
Thanks @iragudo! We can create issue types with avatars now.
It was a little bit difficult to find out that we had to pass the filename of the image to the getResourceAsStream method but not its name used in the atlassian-plugin.xml:
Thanks for the help. You can close this issue now. Our code to create issue types with avatars can be found on this page: GitHub Page of ConDec JIRA Plug-In
I have the same problem, but your code does not work for me…
the “tmpAvatar” get’s created, but for any reason the image path changed from “/image/icons/test.png” to “/images/icons/testjrvtg.png” and this causes a file not found exception in the AvatarManager.
java.io.FileNotFoundException: C:\develop\target\jira\home\data\avatars\10900_xxxlarge@3x_\images\icons\testjrvtg.png (Das System kann den angegebenen Pfad nicht finden)
If I use the method ComponentAccessor.getAvatarManager().create(tmpAvatar), so without the input stream, the IssueType get’s created but the image is not displayed…