Images from Azure DevOps → Jira show as plain URLs instead of rendered images (Exalate)

We’re currently experiencing an image synchronization issue when syncing work items from Azure DevOps → Jira via Exalate.

Everything else syncs fine — description, comments, fields, attachments themselves — but images do not render in Jira.
Instead of seeing an image, Jira shows the raw URL, for example:

/attachments/8d2c0e8e-b298-4235-98c0-a1cb78a3a7af?name=image.png

We have tried multiple approaches, including converting the image references into Jira’s wiki syntax (!filename.png!) and also generating <img> tags, but Jira still displays them as plain text.


What we are currently doing (image handling code)

Below is the relevant part of our sync rule where we attempt to:

  1. Rename attachments (ADO → Jira)

  2. Rewrite references inside comment bodies

  3. Convert ADO markdown image links → Jira image syntax

// =======================================================================
// IMAGE SYNC ATTEMPT (ADO → Jira)
// =======================================================================
// We rename ADO attachments and try to rewrite all references in comments
// so that Jira will render them as images (!filename.png!)
// Instead, Jira shows the raw URL as plain text.
// =======================================================================

def idToNewFilename = [:]

// ---- 1. Rewrite attachment file names ----
workItem.attachments?.each { a ->
    if (!a) return

    def original = a.filename ?: "attachment"
    def dot = original.lastIndexOf('.')
    def base = (dot > 0 ? original.substring(0, dot) : original)
    def ext  = (dot > 0 ? original.substring(dot) : "")

    def newName = base + "__" + UUID.randomUUID().toString().take(8) + ext

    // Using hashCode() instead of a.id (Exalate best practice)
    def key = a.hashCode().toString()
    idToNewFilename[key] = newName

    a.filename = newName
}

// ---- 2. Rewrite markdown image references in comments ----
workItem.comments?.each { c ->
    if (!c?.body) return
    def body = c.body

    idToNewFilename.each { key, newName ->
        // Replace ADO markdown image URLs with Jira “!filename!” syntax
        body = body.replaceAll(
            "!\\[[^\\]]*\\]\\([^)]*" + java.util.regex.Pattern.quote(key) + "[^)]*\\)",
            "!" + newName + "!"
        )
    }

    c.body = body
}


What actually happens

Even after rewriting to !filename!, Jira still displays:

  • plain URL text

  • not rendered images

  • no automatic expansion of the image syntax

Example result:

!image__a31f9e2a.png!

…is displayed literally, not as an image.

How can this be solved? Has anyone faced this issue before?

You’re running into a classic challenge when syncing images from Azure DevOps to Jira: even after rewriting image references to Jira’s wiki syntax (like !filename.png!), Jira just shows the literal text instead of rendering the image. This is a common pain point, and it’s not about the syntax in your sync rules—it’s about how Jira handles attachments and image rendering.

Here’s what’s happening:

  • Jira only renders images with the !filename! syntax if the referenced file is actually attached to the issue in Jira.
  • If the attachment isn’t present, or if the filename in the wiki syntax doesn’t match the actual attachment’s filename in Jira, Jira will just display the text.

A few things to check and try:

  1. Attachment Upload Timing: Make sure the attachment is uploaded to Jira before the comment or description referencing it is synced. If the comment arrives before the attachment, Jira can’t render the image.
  2. Filename Consistency: The filename in your !filename! syntax must exactly match the filename of the attachment as it exists in Jira after sync. Any mismatch (even in case) will break rendering.
  3. Attachment Permissions: Ensure that the attachments are visible to the users viewing the issue in Jira. If permissions are restricted, images won’t render.
  4. Jira Cloud vs. On-Prem: If you’re on Jira Cloud, note that the new issue view sometimes doesn’t render wiki markup images in comments, only in the description. Try switching to the old view or check if the image renders in the description field.

What you can do:

  • Double-check your sync rule to ensure that the attachment renaming and the wiki syntax update are perfectly in sync.
  • Consider splitting your sync so that attachments are synced first, then comments/descriptions referencing them are updated in a subsequent sync cycle.
  • If you’re using comments, try referencing the image in the description instead, as Jira is more reliable at rendering images there.

For more on field mappings and scripting advanced sync logic, check out the official docs:

If you need a code example for a two-step sync or want to see a sample script, let me know!

@abdullahr99

Is this Jira Cloud or Jira On-primise ?

Hi! This is Jira Cloud

Hi @abdullahr99

Appreciate your patience. I will be working on it.

Please check the following articles:

Try the suggestions and let me know the outcome.