---
title: "Include images"
url: https://www.marlasowards.com/samples/release-notes-automation-guide/35-include-images-in-release-notes
description: "How to add an image to release notes that are posted to Clearpath Community through its REST API, where UI edits get overwritten."
author: Writing sample by Marla Sowards
---

> For an index of every page on this site, see [llms.txt](https://www.marlasowards.com/llms.txt).

> **Note:** I built this project for an enterprise SaaS company. However, what I've shared is genericized to mask proprietary information, including names of companies, products, features, and UI controls. Product images are mockups generated by Claude.

# Include images

You can add an image to a Clearpath Community page with the UI editor. However, release notes are posted programmatically using the Clearpath Community REST API. Changes made in the UI editor are overwritten by programmatic updates.

That means that:

- The image is first uploaded to Clearpath Community cloud storage
- The URL to the image in cloud storage is procured
- The URL is included in the Markdown file

## Prerequisites

- jq
- Clearpath Community API key (see [Prerequisites to post HTML to Clearpath Community with the REST API](https://www.marlasowards.com/samples/release-notes-automation-guide/43-community-site-pages-setup.md#prerequisites-to-post-html-to-clearpath-community-with-the-rest-api))

## Steps

Create a **media** directory in the **YYYY-MM-DD** directory.

Add the images to the **media** directory.

Match the variables in the release-notes repo > **scripts** > **years** > **img.sh** to the date of the **YYYY-MM-DD** directory. For example:

```bash
year=2021
month=03
day=10
```

Add your Clearpath Community API key in the two lines with `'Rest-User-Token: API_KEY'`. See [Prerequisites](https://www.marlasowards.com/samples/release-notes-automation-guide/35-include-images-in-release-notes.md#prerequisites).

Create a **key.json** file with the filename(s) and title(s) you want to give the image(s). For example:

```json
[
  {
    "filename": "data-catalog-details.png",
    "title": "Data Catalog details"
  },
  {
    "filename": "data-quality-catalog-details.png",
    "title": "Data Quality Catalog Details"
  },
  {
    "filename": "data-quality-catalog-list.png",
    "title": "Data Quality Catalog List"
  }
]
```

Open **scripts/years** in the terminal.

Run `./img.sh`.

A **url.txt** file is output to the directory. For example:

```plaintext
<clearpath-community-file-url-1>
<clearpath-community-file-url-2>
<clearpath-community-file-url-3>
```

Add the URLs in the Markdown file. For example:

```markdown
![Chart, scatter chart description automatically generated](<clearpath-community-file-url>)
```

The images are published on the release notes page in the [Publish release notes](https://www.marlasowards.com/samples/release-notes-automation-guide/33-publish-release-notes.md) step.
