macOS Windows Linux
# 1. Upload specific file
$
/Applications/PicGo.app/Contents/MacOS/PicGo upload /img/test.jpg
# 2. Upload from clipboard (no args)
$
/Applications/PicGo.app/Contents/MacOS/PicGo upload
# 1. Upload specific file
$
C:\Path\To\PicGo.exe upload D:\img\test.jpg
# 2. Upload from clipboard (no args)
$
C:\Path\To\PicGo.exe upload
# 1. Upload specific file
$
./PicGo.AppImage upload /home/user/img/test.jpg
# 2. Upload from clipboard (no args)
$
./PicGo.AppImage upload
# Output Log
[PicGo SUCCESS]
https://***.com/your-image.jpg
$
curl -X POST http://127.0.0.1:36677/upload \
-H 'Content-Type: application/json' \
-d '{"list":["/path/to/img.jpg"]}'
{
"list" : ["/path/to/img.jpg" ] // Empty array uploads the image from clipboard
}
# Response
{
"success" : true , "result" : ["https://***.com/your-image.jpg" ]
}
# Run instantly without installing
# Upload specific file
$
npx picgo upload /path/to/image.png
# Upload from clipboard
$
npx picgo upload
# Output
[PicGo SUCCESS]
https://***.com/your-image.jpg
ES Module CommonJS
// ES module import
import { PicGo } from 'picgo' // npm install picgo
// CommonJS import
const { PicGo } = require ('picgo' )// npm install picgo
const picgo = new PicGo ()
// Upload from path
picgo.upload (['/xxx/xxx.jpg' ])
// Upload from clipboard
picgo.upload ()