# Image width, height, alt and alignment in Jira markup

URL: https://goingstellar.ro/reference/jira-formatting/image-attributes/

After the URL, `|` starts a comma separated list of name=value pairs that become attributes of the image tag. The help lists `thumbnail` and `align=right, vspace=4` as examples. On Cloud, only a few of them survive the move to ADF.

## Wiki markup

```
!image.jpg|thumbnail!
!image.gif|align=right, vspace=4!
!https://example.com/logo.png|width=200,height=100!
!https://example.com/logo.png|alt=Company logo!
```

## Stored as ADF (REST API v3)

The ADF document Jira Cloud stores for `ADF:{"content": [{"attrs": {"layout": "center"}, "content": [{"attrs": {"height": 100, "type": "external", "url": "https://example.com/logo.png", "width": 200}, "type": "media"}], "type": "mediaSingle"}], "type": "doc", "version": 1}`:

```json
{
 "type": "doc",
 "version": 1,
 "content": [
  {
   "type": "mediaSingle",
   "attrs": {
    "layout": "center"
   },
   "content": [
    {
     "type": "media",
     "attrs": {
      "type": "external",
      "url": "https://example.com/logo.png",
      "height": 100,
      "width": 200
     }
    }
   ]
  }
 ]
}
```

## Examples

Wiki markup (API v2):

```
!https://example.com/logo.png|width=200!
```

Fix the displayed width only. The HTML gets a width attribute and no height.

Rendered by Jira (HTML):

```html
<p><span class="image-wrap" style=""><img src="https://example.com/logo.png" width="200" style="border: 0px solid black" /></span></p>
```

Back to wiki after the round trip:

```
!https://example.com/logo.png|width=200,height=183!
```

Sent to Jira Cloud on 29 Nov 2026.

Wiki markup (API v2):

```
!https://example.com/logo.png|width=200,height=100!
```

Fix both sizes so the layout does not jump while the image loads. Both values are stored in ADF and come back unchanged.

Rendered by Jira (HTML):

```html
<p><span class="image-wrap" style=""><img src="https://example.com/logo.png" height="100" width="200" style="border: 0px solid black" /></span></p>
```

Back to wiki after the round trip:

```
!https://example.com/logo.png|width=200,height=100!
```

Sent to Jira Cloud on 29 Nov 2026.

Wiki markup (API v2):

```
!https://example.com/logo.png|alt=Company logo!
```

Add alt text for screen readers. ADF keeps it as the alt attribute, and wiki written from ADF puts the value in quotes.

Rendered by Jira (HTML):

```html
<p><span class="image-wrap" style=""><img src="https://example.com/logo.png" alt="Company logo" style="border: 0px solid black" /></span></p>
```

Back to wiki after the round trip:

```
!https://example.com/logo.png|width=200,height=183,alt="Company logo"!
```

Sent to Jira Cloud on 29 Nov 2026.

ADF (API v3):

```
{"content": [{"attrs": {"layout": "center"}, "content": [{"attrs": {"height": 100, "type": "external", "url": "https://example.com/logo.png", "width": 200}, "type": "media"}], "type": "mediaSingle"}], "type": "doc", "version": 1}
```

The same 200 by 100 image written as ADF. v2 returns the wiki form with width and height.

Rendered by Jira (HTML):

```html
<p><span class="image-wrap" style=""><img src="https://example.com/logo.png" height="100" width="200" style="border: 0px solid black" /></span></p>
```

Back to wiki after the round trip:

```
!https://example.com/logo.png|width=200,height=100!
```

Sent to Jira Cloud on 29 Nov 2026.

## What changes in conversion

- `width`, `height` and `alt` are kept in ADF as media attributes. With only `width=200`, ADF still gets height 183, and the wiki read back from it gains `height=183`.
- `alt=Company logo` comes back from ADF as `alt="Company logo"`, with quotes.
- `align=right, vspace=4` and `thumbnail` were not stored as such: the media node had layout `center` and width 200, height 183. These two probes used file names with no attachment, so a write-back could not be tested.
- In ADF the placement is the `layout` attribute of `mediaSingle` (per the documentation: wrap-left, center, wrap-right, wide, full-width, align-start, align-end). The wiki align attribute has no mapping in these runs.

## Pitfalls

- Do not rely on `align`, `vspace` or `thumbnail` in a field that Cloud stores as ADF; the stored node used layout center.
- The pairs are separated by commas. Spaces after the comma were accepted in the help example, but the safest form is `width=200,height=100`.
- Setting only one dimension still ends with both stored in ADF, so the picture may be stretched if 183 is not the right height.

## Related

- [!image! images](https://goingstellar.ro/reference/jira-formatting/images/)
- [Embedded video and audio](https://goingstellar.ro/reference/jira-formatting/embedded-media/)
- [||header|| and |cell| tables](https://goingstellar.ro/reference/jira-formatting/tables/)

## Sources

- [Text Formatting Notation Help (Jira, in-product help)](https://jira.atlassian.com/secure/WikiRendererHelpAction.jspa?section=all)
- [Atlassian Document Format: document structure (Jira Cloud platform)](https://developer.atlassian.com/cloud/jira/platform/apis/document/structure/)

