baoyu-compress-image

Compress images to JPEG, WebP, or PNG with quality control and archival.

4|1|Updated Mar 2, 2026
One-click install
npx skills add https://github.com/tentacle-pro/skills --skill baoyu-compress-image-tentacle-pro
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: baoyu-compress-image
Source: https://github.com/tentacle-pro/skills/tree/main/baoyu-compress-image
Command: npx skills add https://github.com/tentacle-pro/skills --skill baoyu-compress-image-tentacle-pro

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires sharp, and includes scripts (resource) components.

What problem does it solve?

This Skill reduces large image file sizes and converts images into web-friendly formats to meet platform upload limits and keep Obsidian vaults tidy without manual re-exporting.

Core Features & Use Cases

  • Automatic engine detection: Chooses the fastest available compressor on the system (sips, cwebp, ImageMagick convert) and falls back to Sharp when needed.
  • Web-focused defaults: Produces JPEG at 65 quality by default for <1MB target outputs and supports webp and png formats.
  • Vault-safe archival: Replaces or compresses files and archives originals into Archive/Original-Images to avoid cluttering Assets/.
  • Batch and automation: Handles single files or directories recursively, supports JSON output for integration into pipelines, and offers quality and format options for publishing workflows.
  • Use Case: Prepare an Obsidian Assets folder for publishing by batch-compressing generated AI images into optimized JPEGs while preserving originals in an archive.

Quick Start

Compress the file Assets/cover-draft.png to a 65-quality JPEG and move the original into Archive/Original-Images.

Frequently Asked Questions about baoyu-compress-image

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I batch compress images in an Obsidian assets folder for web publishing?

Batch compress images in an Obsidian assets folder by processing directories recursively to output web-friendly JPEG, WebP, or PNG formats while archiving originals into Archive/Original-Images.

What is the best way to reduce image file size to meet platform upload limits?

Reduce image file size to meet platform upload limits by applying default JPEG compression at 65 quality, which targets outputs under 1MB without manual re-exporting.

Does sharp work with JPEG, WebP, and PNG outputs for vault workflows?

Sharp works with JPEG, WebP, and PNG outputs for vault workflows by acting as a fallback compressor when native system tools like sips, cwebp, or ImageMagick convert are unavailable.

Can I automate image compression and generate JSON reports for publishing pipelines?

Automate image compression and generate JSON reports for publishing pipelines by processing single files or directories recursively with supported quality and format options.

How do I preserve original images when compressing files in an Obsidian vault?

Preserve original images when compressing files in an Obsidian vault through vault-safe archival, which automatically moves uncompressed originals into Archive/Original-Images to avoid cluttering Assets/.