Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Unable to Load and Upload Images when Using API Token for Issues

Leon Li
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
December 9, 2025

Hi Bitbucket Community Team,

I am working on integrating with Bitbucket Cloud's REST API (using an API Token) to automate interactions with Issues in our repositories.

Currently, I'm facing two specific issues related to images:

  1. Images Not Loading when Fetching Issue Details: When I use the API  to retrieve the details of an issue, the returned JSON contains the description and comments as HTML content. However, any images referenced within (likely uploaded as attachments) fail to load. The image links appear to be internal Bitbucket links, and direct access seems to require authentication. Could you please advise on the correct way to retrieve or render these images via the API?

  2. Unable to Upload Images when Commenting via API: When I attempt to create a comment using the API , I can successfully post plain text comments. However, I cannot find a method to upload and embed an image attachment within the comment​ through the API. The official documentation doesn't seem to clearly outline how to achieve this.

My questions are:

  • For Problem 1 (Loading Images), is there a specific API endpoint or parameter that allows me to fetch attachment information or generate an accessible image URL (even if temporary) along with the issue data?

  • For Problem 2 (Uploading Images), what is the correct workflow and endpoint for uploading an image attachment within an Issue comment? Does it involve uploading the attachment first and then referencing it in the comment content?

Thank you very much for your time and assistance! I look forward to your response.

2 answers

0 votes
Leon Li
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
December 16, 2025

Hi Mark,

Thank you very much for your quick response and for pointing me to the attachments endpoints!

I wasn't fully aware that images embedded in issue descriptions and comments are handled through the attachments mechanism. I'll go ahead and test the following workflow right away:

  1. Upload images using POST /issues/{issue_id}/attachments
  2. Reference them in comments (or description) with Markdown like ![alt text](attachment:filename.png)
  3. Retrieve and render images by fetching the attachment list and then accessing individual files

I'll try implementing this and see if it resolves both the loading and uploading issues.

If I run into any specific errors or have further questions after testing, I'll follow up here.

Thanks again for your help!

Best regards,

Leon Li

0 votes
Mark C
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
December 16, 2025

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
TAGS
AUG Leaders

Atlassian Community Events