-
Type:
Bug
-
Resolution: Duplicate
-
Priority:
Low
-
Component/s: Work Item - Backend - Attachments
-
Minor
Issue Summary
Creating Jira issues via the REST API with wiki-style inline image references in the description, and then adding the corresponding image using the Add Attachments API, results in the image not rendering inline in the issue’s description. The attachment is successfully added to the issue, but the inline reference remains broken (grey/empty placeholder). This has been identified as a bug in the Jira Cloud REST APIs:
POST /rest/api/2/issue
POST /rest/api/2/issue/{issueIdOrKey}/attachments
Steps to Reproduce
- Ensure you have a Jira Software Cloud project with attachments enabled and valid credentials (email + API token).
- Create an issue via the Create Issue REST API, with a description that references an image using wiki markup where the filename matches the file that will be uploaded later, for example:
curl --request POST \ --url 'https://<site>.atlassian.net/rest/api/2/issue' \ --user 'email@example.com:<api_token>' \ --header 'Accept: application/json' \ --header 'Content-Type: application/json' \ --data '{ "fields": { "project": { "id": "10000" }, "issuetype": { "id": "10001" }, "summary": "Inline image test via REST", "description": "Testing inline image via REST API\n\n!{imagename}|width=686,alt=\"{imagename}\"!" } }'
- Note the issue key from the response, e.g. KC-123
- Upload the image as an attachment to the same issue using the Add Attachments REST API, with the filename matching the description reference:
curl --request POST \ --url 'https://<site>.atlassian.net/rest/api/2/issue/KC-123/attachments' \ --user 'email@example.com:<api_token>' \ --header 'X-Atlassian-Token: no-check' \ --form 'file=@"/Users/suniyal/Downloads/image-20260216-070614.png"'
Expected Results
- After the image file is successfully uploaded via
POST /rest/api/2/issue/{issueIdOrKey}/attachmentsJira Cloud should correctly associate the attachment with the wiki-style reference in the description.
- When viewing the issue in the Jira Cloud UI:
The referenced image should render inline within the Description field.
No grey/blank placeholders should appear where the image is referenced.
Actual Results
- The POST /rest/api/2/issue call successfully creates the issue with a description containing a wiki-style image reference.
- The POST /rest/api/2/issue/{issueIdOrKey}/attachments call successfully uploads the image as an issue-level attachment, and the file appears correctly under the Attachments section of the issue.
- However, when viewing the issue in the Jira Cloud UI:
The inline image in the Description does not render.
Instead, a grey/empty placeholder is shown where the inline image should appear, indicating that the REST-created attachment is not being correctly linked to the description’s inline image reference. - The development team has confirmed this behaviour is a bug in the current implementation of the Create Issue and Add Attachments REST APIs for Jira Software Cloud.
Workaround
Currently there is no known workaround for this behavior. A workaround will be added here when available
- duplicates
-
JRACLOUD-97685 Attachment previews are sometimes unavailable for work items created via automation rule
-
- Short Term Backlog
-