### Install and Configure PicGo Plugins Source: https://context7.com/picgo/picgo-doc/llms.txt Guides on installing and managing PicGo plugins to extend functionality. Covers GUI and command-line installation, updating, and uninstallation. Includes an example of configuring a plugin for image compression. ```bash # Prerequisites: Node.js must be installed # Search and install plugin via GUI: # 1. Open PicGo > Plugin Settings # 2. Search plugin name (without 'picgo-plugin-' prefix) # 3. Click Install # Example plugins: # - gitee: Gitee image host support # - github-plus: Enhanced GitHub uploader # - compress: Image compression before upload # - watermark: Add watermarks to images # - rename-file: Advanced file renaming # Install via command line: cd ~/.picgo npm install picgo-plugin-gitee # Plugin configuration example in data.json: { "picgoPlugins": { "picgo-plugin-compress": { "quality": 80, "enabled": true } } } # Update plugin: # GUI: Plugin Settings > Update button # CLI: npm update picgo-plugin-name # Uninstall plugin: # GUI: Plugin Settings > Uninstall button # CLI: npm uninstall picgo-plugin-name ``` -------------------------------- ### PicGo Proxy Configuration Examples (Shell) Source: https://context7.com/picgo/picgo-doc/llms.txt Illustrates various ways to configure HTTP proxy settings for PicGo via the command line or GUI. It includes examples for local, remote, and authenticated proxies, along with guidance on testing the connection. ```bash # Supported proxy types: HTTP only # Format: http://host:port # Example configurations: # Local proxy: http://127.0.0.1:7890 # Remote proxy: http://proxy.company.com:8080 # With authentication: http://user:pass@proxy.company.com:8080 # Configure in GUI: # Settings > Proxy Settings # Test proxy connection: # Upload a test image after configuring proxy # Check upload logs: Settings > Upload Logs ``` -------------------------------- ### Configure GitHub Image Host Source: https://context7.com/picgo/picgo-doc/llms.txt Configuration details for using GitHub as an image hosting service. Requires repository name, personal access token, optional path, custom URL, and branch. Includes setup steps and an example repository structure. ```json { "picBed": { "github": { "repo": "username/repository-name", "token": "ghp_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx", "path": "images/", "customUrl": "https://cdn.jsdelivr.net/gh/username/repository-name", "branch": "main" } } } ``` ```bash # Steps to configure: # 1. Create a GitHub repository for storing images # 2. Generate a personal access token at https://github.com/settings/tokens # Required scope: repo (Full control of private repositories) # 3. Configure in PicGo GUI or edit data.json directly # 4. Upload test image - it will appear in your repository # Example API call after configuration: # File uploads automatically via PicGo GUI or API # Repository structure: # repository-name/ # images/ # 2024-12-03-screenshot.png # 2024-12-03-diagram.jpg ``` -------------------------------- ### Install PicGo Across Platforms Source: https://context7.com/picgo/picgo-doc/llms.txt Instructions for installing PicGo on Windows, macOS, and Arch Linux using package managers like Scoop, Chocolatey, Homebrew, and AUR. Also includes manual installation steps via GitHub releases. ```bash # Windows - using Scoop scoop bucket add helbing https://github.com/helbing/scoop-bucket scoop install picgo # Windows - using Chocolatey choco install picgo # macOS - using Homebrew brew install picgo --cask # Arch Linux - using AUR yay -S picgo-appimage # Manual installation - Download from GitHub Releases # Windows: .exe installer # macOS: .dmg package # Linux: .AppImage # https://github.com/Molunerfinn/PicGo/releases ``` -------------------------------- ### PicGo Command Line Upload Source: https://context7.com/picgo/picgo-doc/llms.txt Explains how to upload images directly from the command line on Windows, macOS, and Linux. It covers uploading the clipboard image and specific files. A shell script example shows how to perform batch uploads. ```bash # Windows "C:\Program Files\PicGo\PicGo.exe" upload "C:\Program Files\PicGo\PicGo.exe" upload C:\path\to\image.jpg # macOS /Applications/PicGo.app/Contents/MacOS/PicGo upload /Applications/PicGo.app/Contents/MacOS/PicGo upload /path/to/image.jpg # Linux /opt/PicGo.AppImage upload /opt/PicGo.AppImage upload /home/user/image.jpg # Without arguments, uploads clipboard image # With file path, uploads specified image(s) # Output: Uploaded URL copied to clipboard # Shell script example for batch upload: #!/bin/bash PICGO="/Applications/PicGo.app/Contents/MacOS/PicGo" for img in ./screenshots/*.png; do $PICGO upload "$img" sleep 1 done ``` -------------------------------- ### Upload Images via Clipboard Shortcut Source: https://context7.com/picgo/picgo-doc/llms.txt Demonstrates the keyboard shortcuts for uploading images directly from the clipboard on macOS, Windows, and Linux. The uploaded image URL is automatically copied to the clipboard, with examples of default and custom output formats. ```bash # macOS Command + Shift + P # Windows/Linux Ctrl + Shift + P # The uploaded image URL will be automatically copied to clipboard # Result format (default Markdown): # !["image-alt-text"](https://your-image-host.com/uploaded-image.png) # Custom link format example in data.json: # $url - the image URL # $fileName - original filename # $extName - file extension # Custom: ![$fileName]($url) ``` -------------------------------- ### Integrate PicGo with File Managers (Bash) Source: https://context7.com/picgo/picgo-doc/llms.txt Provides a bash script example for Linux users to integrate PicGo with the Nautilus file manager. This script allows users to right-click files and upload them using PicGo. It requires the script to be saved in a specific directory and made executable. ```bash # Linux - Nautilus script example #!/bin/bash # Save as ~/.local/share/nautilus/scripts/Upload with PicGo for file in "$@"; do /path/to/PicGo.AppImage upload "$file" done # Make executable: chmod +x ~/.local/share/nautilus/scripts/Upload\ with\ PicGo # Usage: Select files in file manager, right-click, choose script ``` -------------------------------- ### PicGo Configuration File Locations Source: https://context7.com/picgo/picgo-doc/llms.txt Details the location of the PicGo configuration file (`data.json`) across Windows, macOS, and Linux operating systems. Provides an example structure of the configuration file, including settings for image beds, custom links, and upload notifications. ```bash # Windows %APPDATA%\picgo\data.json # Full path example: C:\Users\YourName\AppData\Roaming\picgo\data.json # macOS ~/Library/Application Support/picgo/data.json # Linux ~/.config/picgo/data.json # Open configuration file from GUI: # Settings > Open Configuration File # Configuration structure: { "picBed": { "current": "github", "github": { /* GitHub config */ }, "smms": { /* SM.MS config */ } }, "settings": { "shortKey": { "upload": "CommandOrControl+Shift+P" }, "customLink": "![$fileName]($url)", "autoRename": true, "uploadNotification": true }, "uploaded": [ { "fileName": "image.png", "url": "https://example.com/image.png", "imgUrl": "https://example.com/image.png" } ] } ``` -------------------------------- ### PicGo-Server API - Upload Images with HTTP Form Data Source: https://github.com/picgo/picgo-doc/blob/master/docs/en/guide/advance.md Starting from version 2.4.0, PicGo-Server supports uploading images using multipart form-data. This is useful for uploading multiple files at once. ```APIDOC ## PicGo-Server API - Upload Images with HTTP Form Data This endpoint allows uploading one or more image files using multipart form-data. ### Method `POST` ### Endpoint `http://127.0.0.1:36677/upload` ### Parameters #### Request Body - **files** (file) - Required - The image file(s) to upload. This should be sent as `multipart/form-data`. Multiple files can be uploaded simultaneously. ### Request Example (Content-Type: multipart/form-data) ``` --boundary Content-Disposition: form-data; name="files"; filename="image1.jpg" Content-Type: image/jpeg [Image data for image1.jpg] --boundary Content-Disposition: form-data; name="files"; filename="image2.png" Content-Type: image/png [Image data for image2.png] --boundary-- ``` ### Response #### Success Response (200) - **success** (boolean) - Indicates if the upload was successful. - **result** (array) - An array containing the URLs of the uploaded image(s). #### Response Example ```json { "success": true, "result": ["http://example.com/image1.jpg", "http://example.com/image2.png"] } ``` ``` -------------------------------- ### PicGo-Server: Upload Images via HTTP Form Data (Multipart) Source: https://github.com/picgo/picgo-doc/blob/master/docs/en/guide/advance.md Starting from version 2.4.0, PicGo-Server supports multipart form-data uploads. This allows sending one or more image files as form data with the key 'files' to the server endpoint `http://127.0.0.1:36677/upload`. ```http POST http://127.0.0.1:36677/upload Content-Type: multipart/form-data; boundary=----WebKitFormBoundary7MA4YWxkTrZu0gW ------WebKitFormBoundary7MA4YWxkTrZu0gW Content-Disposition: form-data; files < @/path/to/your/image.jpg ------WebKitFormBoundary7MA4YWxkTrZu0gW-- # Multiple files can be uploaded similarly. ``` -------------------------------- ### Configure Aliyun OSS Image Host Source: https://github.com/picgo/picgo-doc/blob/master/docs/en/guide/config.md Set up Aliyun Object Storage Service (OSS) as an image host. Requires access key ID, secret, bucket name, area code, and optional path and custom URL. Find credentials and bucket details in your Aliyun account. ```json { "accessKeyId": "", "accessKeySecret": "", "bucket": "", // storage bucket "area": "", // storage area "path": "", // storage path "customUrl": "" // customized domain } ``` -------------------------------- ### Configure SM.MS Image Host Source: https://context7.com/picgo/picgo-doc/llms.txt Configuration for SM.MS, a free image hosting service. Requires an API token obtained from the SM.MS dashboard. An optional backup domain can be specified. ```json { "picBed": { "smms": { "token": "your-api-token-from-smms-dashboard", "backupDomain": "smms.app" } } } ``` ```bash # Obtain token from https://sm.ms/home/apitoken # After login, generate a new Secret Token # The backupDomain is optional but recommended for better connectivity ``` -------------------------------- ### GitHub Image Host Configuration Source: https://github.com/picgo/picgo-doc/blob/master/docs/en/guide/config.md Configuration for hosting images on GitHub. Requires the repository in 'user/repo' format, a GitHub token, an optional storage path, a custom domain, and the branch name (defaults to 'main'). The token is generated once and must be backed up. ```json { "repo": "YOUR_USERNAME/YOUR_REPO_NAME", "token": "YOUR_GITHUB_TOKEN", "path": "/your/storage/path/", "customUrl": "YOUR_CUSTOM_DOMAIN", "branch": "main" } ``` -------------------------------- ### Configure Aliyun OSS Source: https://context7.com/picgo/picgo-doc/llms.txt Configuration for Aliyun Object Storage Service (OSS). Requires access key ID, secret key, bucket name, area code, optional path, and custom URL. Common area codes are provided. ```json { "picBed": { "aliyun": { "accessKeyId": "LTAI5txxxxxxxxxxxxxxxx", "accessKeySecret": "your-secret-key", "bucket": "my-images", "area": "oss-cn-shanghai", "path": "picgo/", "customUrl": "https://img.yourdomain.com" } } } ``` ```bash # Common area codes: # oss-cn-hangzhou - China (Hangzhou) # oss-cn-shanghai - China (Shanghai) # oss-cn-beijing - China (Beijing) # oss-cn-shenzhen - China (Shenzhen) # Get credentials at: https://usercenter.console.aliyun.com/#/manage/ak ``` -------------------------------- ### Configure Tencent Cloud COS v5 Source: https://context7.com/picgo/picgo-doc/llms.txt Sets up Tencent Cloud Object Storage (COS) v5 with acceleration support. Requires secret ID, secret key, bucket name, App ID, region, and optionally a custom endpoint for global acceleration and a 'slim' option for smart compression. ```json { "picBed": { "tcyun": { "secretId": "AKIDxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx", "secretKey": "your-secret-key", "bucket": "image-bucket-1234567890", "appId": "1234567890", "area": "ap-shanghai", "path": "uploads/", "customUrl": "", "version": "v5", "endpoint": "cos.accelerate.myqcloud.com", "slim": "true" } } } ``` -------------------------------- ### Backup PicGo Configuration Source: https://context7.com/picgo/picgo-doc/llms.txt Creates a backup of the PicGo data configuration file. This is a simple shell command to copy the local data.json file to a backup location. ```bash cp ~/.config/picgo/data.json ~/picgo-backup.json ``` -------------------------------- ### Qiuniu Image Host Configuration (JSON) Source: https://github.com/picgo/picgo-doc/blob/master/docs/en/guide/config.md Configuration details for the Qiuniu image host, including access keys, bucket name, storage area, custom URL, and optional path and processing options for URL suffixes. ```json { "accessKey": "", "secretKey": "", "bucket": "", // storage bucket "url": "", // customized domain "area": "z0" | "z1" | "z2" | "na0" | "as0", // storage area "options": "", // URL suffix "path": "" // storage path } ``` -------------------------------- ### Configure Custom Link Format Source: https://context7.com/picgo/picgo-doc/llms.txt Allows customization of the output URL format for uploaded images. It defines available variables like `$url`, `$fileName`, and `$extName` for constructing Markdown, HTML, BBCode, or other custom link formats. ```json { "settings": { "customLink": "![$fileName]($url)" } } ``` ```bash # Available variables: # $url - Full image URL # $fileName - Original filename without extension # $extName - File extension (e.g., .jpg, .png) # Markdown format: # ![$fileName]($url) # HTML format: # $fileName # BBCode format: # [img]$url[/img] # Custom with dimensions: # $fileName # Markdown with title: # ![$fileName]($url "$fileName") ``` -------------------------------- ### SM.MS Image Host Configuration (JSON) Source: https://github.com/picgo/picgo-doc/blob/master/docs/en/guide/config.md Configuration for the SM.MS image host, requiring an API token. An optional backup domain can also be specified for alternate uploads, supported since version 2.3.1. ```json { "token": "", // your api token "backupDomain": "" // v2.3.1 Support alternate upload domain, optional. Recommended smms.app } ``` -------------------------------- ### Configure Imgur Image Host Source: https://github.com/picgo/picgo-doc/blob/master/docs/en/guide/config.md Configure Imgur as an image hosting service. Requires a client ID obtained from the Imgur API developer portal. An optional HTTP proxy address can be provided if facing IP restrictions. Note that Imgur may restrict access from mainland China. ```json { "clientId": "", // your clientId "proxy": "" // proxy address, only http supported } ``` -------------------------------- ### Upyun Cloud Configuration Source: https://github.com/picgo/picgo-doc/blob/master/docs/en/guide/config.md Configuration for Upyun Cloud storage. Requires bucket name, operator username, password, optional URL suffix, storage path, and a custom domain. Due to the lack of an intuitive control panel, a third-party web tool is recommended. ```json { "bucket": "YOUR_BUCKET_NAME", "operator": "YOUR_OPERATOR_USERNAME", "password": "YOUR_PASSWORD", "options": "YOUR_URL_SUFFIX", "path": "/your/storage/path/", "url": "YOUR_CUSTOM_DOMAIN" } ``` -------------------------------- ### Configure Qiniu Cloud Storage Source: https://context7.com/picgo/picgo-doc/llms.txt Configuration for Qiniu Cloud Storage, an enterprise-grade CDN service. Requires access key, secret key, bucket name, URL, area code, optional options for image processing, and a path. ```json { "picBed": { "qiniu": { "accessKey": "your-access-key", "secretKey": "your-secret-key", "bucket": "image-bucket", "url": "https://cdn.yourdomain.com", "area": "z2", "options": "?imageslim", "path": "uploads/" } } } ``` ```bash # Area codes: # z0 - East China (Huadong) # z1 - North China (Huabei) # z2 - South China (Huanan) # na0 - North America # as0 - Southeast Asia # Example with image processing: # options: "?imageView2/2/w/800/h/600" # This adds URL suffix for automatic image optimization ``` -------------------------------- ### Upload using Command Line Source: https://github.com/picgo/picgo-doc/blob/master/docs/en/guide/advance.md PicGo supports uploading images directly from the command line. You can upload the image currently in your clipboard or specify a file path. ```APIDOC ## Upload using Command Line You can use the `upload` command to upload images via the command line. ### Usage - To upload the image on your clipboard: `PicGo upload` - To upload a specific image file: `PicGo upload /path/to/your/image.jpg` ### Platform Specific Commands #### Windows `PATH\PicGo.exe upload` #### macOS `/Applications/PicGo.app/Contents/MacOS/PicGo upload` #### Linux `PATH/PicGo.AppImage upload` ``` -------------------------------- ### Upload Images via Command Line (Windows, macOS, Linux) Source: https://github.com/picgo/picgo-doc/blob/master/docs/en/guide/advance.md PicGo supports uploading images directly from the command line. Users can upload the image on their clipboard or a specific image file by providing its path. This functionality is available from PicGo version 2.1.0 onwards. ```shell PATH\PicGo.exe upload PATH\PicGo.exe upload xxx.jpg ``` ```shell /Applications/PicGo.app/Contents/MacOS/PicGo upload /Applications/PicGo.app/Contents/MacOS/PicGo upload xxx.jpg ``` ```shell PATH/PicGo.AppImage upload PATH/PicGo.AppImage upload xxx.jpg ``` -------------------------------- ### PicGo HTTP Server Uploads Source: https://context7.com/picgo/picgo-doc/llms.txt Demonstrates uploading images using the PicGo HTTP server API. Supports uploading clipboard images, specific files by path, and batch uploads using multipart form-data. The server typically runs on port 36677. ```bash # Upload clipboard image curl -X POST http://127.0.0.1:36677/upload # Response: # { # "success": true, # "result": ["https://your-image-host.com/image.png"] # } # Upload specific image file curl -X POST http://127.0.0.1:36677/upload \ -H "Content-Type: application/json" \ -d '{"list": ["/path/to/image.jpg", "/path/to/photo.png"]}' # Response: # { # "success": true, # "result": [ # "https://your-image-host.com/image.jpg", # "https://your-image-host.com/photo.png" # ] # } # Upload with multipart form-data (v2.4.0+) curl -X POST http://127.0.0.1:36677/upload \ -F "files=@/path/to/image1.jpg" \ -F "files=@/path/to/image2.png" ``` -------------------------------- ### Tencent Cloud COS Image Host Configuration (JSON) Source: https://github.com/picgo/picgo-doc/blob/master/docs/en/guide/config.md Configuration for Tencent Cloud COS, supporting both v4 and v5 versions. Includes secret keys, bucket details, application ID, storage area, custom domain, and an option for smart compression (slim). ```json { "secretId": "", "secretKey": "", "bucket": "", // storage bucket, note that v4 is different from v5 "appId": "", "area": "", // storage area "path": "", // storage path "customUrl": "", // customized domain "version": "v5" | "v4", // COS version "endpoint": "", // Tencent Cloud endpoint, e.g. cos.accelerate.myqcloud.com "slim": "" // whether to enable Smart Compression } ``` -------------------------------- ### Configure PicGo Proxy Settings (JSON) Source: https://context7.com/picgo/picgo-doc/llms.txt Defines the HTTP proxy configuration for PicGo using a JSON object. This allows users in restricted network environments to specify a proxy server for uploads. Only HTTP proxies are supported. ```json { "settings": { "proxy": "http://127.0.0.1:7890" } } ``` -------------------------------- ### Update VuePress Locales Configuration for Translations Source: https://github.com/picgo/picgo-doc/blob/master/CONTRIBUTING-en.md This JavaScript code snippet demonstrates how to update the `locales` configuration in VuePress for internationalization. It shows how to define sidebar and navigation links for both Chinese ('/zh/') and English ('/en/') locales, ensuring that translated content is correctly displayed and accessible. This is crucial for adding new languages or updating existing ones. ```javascript locales: { // ... '/zh/': { sidebar: { '/zh/guide/': getGuideSidebar('指南'), }, nav: [ { text: '指南', link: '/zh/guide/' }, { text: '高级技巧', link: '/zh/guide/advance' } ] }, '/en/': { sidebar: { '/en/guide/': getGuideSidebar('Guidelines'), }, nav: [ { text: 'Guidelines', link: '/en/guide/' }, { text: 'Advance Usage', link: '/en/guide/advance' } ] }, } ``` -------------------------------- ### PicGo-Server: Upload Clipboard Image via HTTP POST Source: https://github.com/picgo/picgo-doc/blob/master/docs/en/guide/advance.md PicGo includes a built-in server (since v2.2.0) that listens on `127.0.0.1:36677` to receive HTTP requests for uploading images. This endpoint handles uploading the image currently on the clipboard. ```http POST http://127.0.0.1:36677/upload # Response: { "success": true, "result": ["url"] } ``` -------------------------------- ### Tencent Cloud COS v4 Configuration Source: https://github.com/picgo/picgo-doc/blob/master/docs/en/guide/config.md Configuration for Tencent Cloud Object Storage (COS) version 4. Requires appId, SecretId, SecretKey, and bucket details. A 'specify storage path' can be set for uploads to folders within the bucket. ```json { "appId": "YOUR_APP_ID", "secretId": "YOUR_SECRET_ID", "secretKey": "YOUR_SECRET_KEY", "bucket": "YOUR_BUCKET_NAME", "area": "YOUR_BUCKET_AREA", "path": "/your/storage/path/" } ``` -------------------------------- ### Tencent Cloud COS v5 Configuration Source: https://github.com/picgo/picgo-doc/blob/master/docs/en/guide/config.md Configuration for Tencent Cloud Object Storage (COS) version 5. Requires appId, SecretId, SecretKey, bucket name (formatted as 'bucket-appId'), and storage area. Endpoint and Smart Compression settings are optional and available from PicGo v2.4.0. ```json { "appId": "YOUR_APP_ID", "secretId": "YOUR_SECRET_ID", "secretKey": "YOUR_SECRET_KEY", "bucket": "YOUR_BUCKET_NAME-YOUR_APP_ID", "area": "YOUR_BUCKET_AREA", "endpoint": "YOUR_ENDPOINT_URL", "saveKey": "/your/storage/path/" } ``` -------------------------------- ### PicGo-Server API - Upload Clipboard Image Source: https://github.com/picgo/picgo-doc/blob/master/docs/en/guide/advance.md The PicGo-Server allows uploading images by sending HTTP requests. This endpoint uploads the image currently in the clipboard. ```APIDOC ## PicGo-Server API - Upload Clipboard Image This endpoint uploads the image currently present in the system clipboard. ### Method `POST` ### Endpoint `http://127.0.0.1:36677/upload` ### Parameters None ### Request Example No request body is needed for uploading the clipboard image. ### Response #### Success Response (200) - **success** (boolean) - Indicates if the upload was successful. - **result** (array) - An array containing the URLs of the uploaded image(s). #### Response Example ```json { "success": true, "result": ["http://example.com/image.jpg"] } ``` ``` -------------------------------- ### PicGo-Server: Upload Specific Image via HTTP POST Source: https://github.com/picgo/picgo-doc/blob/master/docs/en/guide/advance.md The PicGo-Server allows uploading a specific image file by providing its path in the request body. The server listens on `127.0.0.1:36677` and expects a JSON-formatted body with a 'list' key containing the file path. ```http POST http://127.0.0.1:36677/upload Content-Type: application/json { "list": ["xxx.jpg"] } # Response: { "success": true, "result": ["url"] } ``` -------------------------------- ### PicGo-Server API - Upload Specific Image Source: https://github.com/picgo/picgo-doc/blob/master/docs/en/guide/advance.md This endpoint allows uploading a specific image file by providing its path in the request body. ```APIDOC ## PicGo-Server API - Upload Specific Image This endpoint uploads a specified image file by providing its path in the request body. ### Method `POST` ### Endpoint `http://127.0.0.1:36677/upload` ### Parameters #### Request Body - **list** (array of strings) - Required - A JSON-formatted array containing the path(s) to the image file(s) to be uploaded. Example: `{"list": ["/path/to/your/image.jpg"]}` ### Request Example ```json { "list": ["/path/to/your/image.jpg"] } ``` ### Response #### Success Response (200) - **success** (boolean) - Indicates if the upload was successful. - **result** (array) - An array containing the URLs of the uploaded image(s). #### Response Example ```json { "success": true, "result": ["http://example.com/image.jpg"] } ``` ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.