# Upload Photo

> Attach a screenshot/image/video to a PR or issue, or embed an image in a GitHub comment.

Attach a screenshot/image/video to a PR or issue, or embed an image in a GitHub comment.

- Page: https://ss33.ai/skills/different-ai/upload-photo-47338215125
- Publisher: different-ai
- Category: [Software Development](https://ss33.ai/skills/category/software-development-t44z8z) › [Source control & code review](https://ss33.ai/skills/category/software-development-t44z8z/source-control-and-code-review-jebezw)
- License: MIT
- Source: https://github.com/different-ai/openwork/blob/b73f6c697a7cf1270f7d059e3626857827ae41a8/.opencode/skills/upload-photo/SKILL.md

## Skill

SKILL.md: https://ss33.ai/api/v1/ss33/download/different-ai/upload-photo-47338215125

# Upload Photo

Use GitHub CLI 2.99 or newer. Check and upgrade it if needed:

```sh
gh --version
brew upgrade gh
```

Attach a file to a new comment, putting alt text after `#`:

```sh
gh pr comment <n> --attach './shot.png#Alt text'
gh issue comment <n> --attach './shot.png#Alt text'
```

`gh pr create`, `gh pr edit`, `gh issue create`, and `gh issue edit` also accept repeatable `--attach` flags, with at most 50 files.

To place an image in the body, reference the same path:

```sh
printf '![Alt text](./shot.png)\n' | gh pr comment <n> --body-file - --attach './shot.png#Alt text'
```

GitHub rewrites that Markdown reference to the uploaded asset. Unreferenced attachments are appended to the comment.

There is no standalone “get a URL” command. The asset URL lives in the posted comment; read it back with `gh api repos/{owner}/{repo}/issues/comments/<id> --jq .body`.
