Host Image
Requirements
Path to the image file to upload.
Optional: custom filename for the hosted image (will be sanitized).
2
Upload the image using Upload Image to GitHub Pages with:
- The image path from requirements
- Optional custom filename (or empty string to use default)
Hosted Images Index for tracking
Present the public URL to the user. Note that GitHub Pages may take 1-2 minutes to serve new images on first upload.
4
Share the public URL from the upload result. If this was the first upload (new repo created), remind the user it may take 1-2 minutes for the URL to become active.
To run this task you must have the following required information:
> Path to the image file to upload.
Optional: custom filename for the hosted image (will be sanitized).
If you don't have all of this information, exit here and respond asking for any extra information you require, and instructions to run this task again with ALL required information.
---
You MUST use a todo list to complete these steps in order. Never move on to one step if you haven't completed the previous step. If you have multiple read steps in a row, read them all at once (in parallel).
Add all steps to your todo list now and begin executing.
## Steps
1. [Read Image Hosting Integration Guide]: Read the documentation in: `skills/sauna/[skill_id]/references/media.hosting.guide.md`
2. Upload the image using `skills/sauna/[skill_id]/scripts/media.github.upload.js` with:
- The image path from requirements
- Optional custom filename (or empty string to use default)
- `documents/hosted-images.json` for tracking
Present the public URL to the user. Note that GitHub Pages may take 1-2 minutes to serve new images on first upload.
3. [Gather Arguments: Upload Image to GitHub Pages] The next step has the following requirements for arguments, do not proceed until you have all the required information:
- `imagePath`: image path from requirements
- `filename`: custom filename from requirements, or empty string
- `trackingPath`: documents/hosted-images.json
4. [Run Code: Upload Image to GitHub Pages]: Call `run_script` with:
```json
{
"file": {
"path": https://sk.ills.app/code/media.github.upload/preview,
"args": [
"imagePath",
"filename",
"trackingPath"
]
},
"packages": null
}
```
5. Share the public URL from the upload result. If this was the first upload (new repo created), remind the user it may take 1-2 minutes for the URL to become active.