Overview
PicGo-Core is the underlying engine used by PicGo. You can think of it as a lightweight, extensible upload workflow.
Tip
Unless explicitly stated otherwise, picgo and PicGo-Core refer to the same thing in this documentation. PicGo refers to the Electron app.
Features
- CLI support
- Programmatic API
- Plugin system
How does it work?
The diagram below shows the PicGo-Core lifecycle:

The 4 components
- Input: accepts images from external sources. By default this is a file path or full Base64 image data.
- Transformer: converts the input into an image object that can be uploaded (width/height, Base64/buffer, filename, etc.).
- Uploader: uploads the transformed output to a target destination. The default uploader is SM.MS.
- Output: the upload result. Typically you read the final URL from
imgUrl.
The 3 lifecycle hooks
beforeTransform: access input infobeforeUpload: access the output after the transformerafterUpload: access the final output
You can provide images via the CLI or via the API, and PicGo will upload them following this lifecycle and return the URL.
Tip
Plugins can provide custom Uploaders and Transformers, and can also hook into these lifecycle stages to implement more advanced workflows.
