Indeed, not easy if your jira instance is protected. You could ask on the jira support forums if there’s a way to get the image embedded in the returned content (using Data URI for example).
An alternative (complex) would be to parse the returned HTML to find the URLs and then issue several HTTP requests (using the jira credentials provided) to download the images and replace the <img>
URL attribute to be something like <img src="data:image/gif;base64,...
. However, this will be complex, costly and slow IMO.