Back to Registry
View Author Profile
Official Verified
smart-image-loader
Smart image loader that handles both URLs and local files, automatically downloads URLs to temporary locations, and displays images using the read tool. Use when a user wants to view or display an image, whether it's a web URL or a file in the workspace.
skill-install — Terminal
Install via CLI (Recommended)
clawhub install openclaw/skills/skills/tingwei1123/smart-image-loaderOr
Smart Image Loader
Quick Start
When a user asks to display an image:
-
Check if input is a URL or local path
- URLs start with
http://orhttps:// - Local paths are file paths in the workspace
- URLs start with
-
For URLs:
- Download the image to a temporary location using the Python script
- Use
readtool to display the image - Clean up the temporary file afterward
-
For local files:
- Verify the file exists (relative to workspace or absolute path)
- Use
readtool directly to display the image
Usage Examples
User says: "Show me this image: https://example.com/photo.jpg"
- Run:
python3 scripts/smart_image_loader.py https://example.com/photo.jpg - Script downloads to temp:
/tmp/dir/photo.jpg - Use
readtool on:/tmp/dir/photo.jpg - Clean up: Delete the temp file
User says: "Display ./images/logo.png"
- Run:
python3 scripts/smart_image_loader.py ./images/logo.png - Script verifies file exists
- Use
readtool on:/home/node/clawd/images/logo.png(absolute path)
Script Usage
python3 scripts/smart_image_loader.py <image_path_or_url>
Arguments
| Argument | Description |
|---|---|
image_path_or_url | Either a local file path (relative or absolute) or a URL |
Output Format
The script returns a JSON-like output with:
Status: SUCCESS or FAILEDType: url or localFile Path: Local path for thereadtoolMessage: Status descriptionCleanup Needed: true if temp file should be deleted
Examples
# URL example
python3 scripts/smart_image_loader.py https://example.com/image.jpg
# Output: Downloads to /tmp/xyz/image.jpg, use read tool on that path
# Local file example (relative)
python3 scripts/smart_image_loader.py ./photos/vacation.jpg
# Output: File found at /home/node/clawd/photos/vacation.jpg
# Local file example (absolute)
python3 scripts/smart_image_loader.py /home/node/clawd/downloads/graphic.png
# Output: File found at /home/node/clawd/downloads/graphic.png
Workflow Decision Tree
User asks to display an image
|
v
Is it a URL? (http:// or https://)
|
+----+---------------------------+
| |
YES NO
| |
v v
Download to temp Does file exist?
| |
v +-----+-----+
Use read tool | |
| YES NO
v |
Cleanup temp file v
Use read tool
|
v
Done (no cleanup)
Cleanup Guidelines
Metadata
AI Skill Finder
Not sure this is the right skill?
Describe what you want to build — we'll match you to the best skill from 16,000+ options.
Find the right skill Add to Configuration
Paste this into your clawhub.json to enable this plugin.
{
"plugins": {
"official-tingwei1123-smart-image-loader": {
"enabled": true,
"auto_update": true
}
}
}Safety NoteClawKit audits metadata but not runtime behavior. Use with caution.