Fetch an image, convert it on the server, commit it to GitHub
github_commit_imageDownload, convert, and resize a source image, then commit it and any variants straight to a repo branch in a single commit, all server-side without touching your local machine.
Instructions
Download an image from a public URL, convert it (webp by default), resize or cover-crop it, optionally add variants (e.g. a card thumbnail), and commit every output to a branch in one commit. Runs entirely on the server, nothing on the client machine. Use dryRun to see resulting dimensions and bytes first; then register the file in the site's code with github_commit_files (edits).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | Destination path in the repo, e.g. 'public/assets/img/blog/cover.webp'. | |
| repo | Yes | Repository as 'owner/name', e.g. 'octocat/my-site'. | |
| focus | No | Crop anchor: 'attention' keeps the visually busiest region, 'centre' crops symmetrically. | attention |
| width | No | Target width. With height too, the image is cover-cropped to exactly that size; alone, height follows the aspect ratio. Never upscaled. | |
| branch | Yes | Branch to commit to, e.g. 'main'. | |
| dryRun | No | Fetch and convert, report dimensions and bytes, commit nothing. | |
| format | No | webp | |
| height | No | ||
| message | Yes | Commit message in the repository's conventions. | |
| quality | No | ||
| variants | No | Extra outputs from the same source (same format/quality/focus), e.g. a 1000×562 card version. | |
| sourceUrl | Yes | http(s) URL of the source image: an image already on a site, a CDN, a shared Google Drive link (uc?export=download&id=…), etc. | |
| createBranch | No |