Skip to content
18616901602-designPublic

About

图压 PicShrink · 纯前端在线图片压缩与格式转换工具(WebP/AVIF/JPEG/PNG/HEIC),图片本地处理不上传,零服务器成本,支持 PWA 离线使用。

Topics

Resources

Contributing

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

3 Commits

Folders and files

Repository files navigation

图压 PicShrink

纯前端在线图片压缩与格式转换工具 · 图片只在浏览器里处理,不上传服务器 · 可离线使用

License: MIT Pure Frontend Offline Ready

English | 中文


中文

功能特性

  • 多格式输出:WebP、AVIF、JPEG、PNG,或保持原格式
  • 多格式输入:JPG、PNG、WebP、AVIF、GIF、BMP、HEIC/HEIF(iPhone 照片)
  • 本地处理:所有图片在浏览器内通过 Canvas 处理,不上传任何服务器,保护隐私
  • 批量处理:支持一次选择多张图片,或整个文件夹递归处理
  • 拖拽上传:整个页面都支持拖放,文件或文件夹直接拖入
  • 质量调节:实时滑块调节压缩质量,即时预览效果
  • 尺寸限制:可设置最大边长,等比缩小手机大图
  • EXIF 方向修正:自动修正手机拍照的方向问题
  • 打包下载:多张图片可一键打包为 ZIP 下载
  • 复制到剪贴板:压缩后直接复制图片到剪贴板
  • PWA 支持:可安装到桌面,离线也能使用
  • 零依赖部署:单个 HTML 文件,托管到任何静态空间即可运行

在线使用

部署后访问 index.html 即可使用。也可以直接将本仓库开启 GitHub Pages 后访问。

本地运行

无需构建工具,直接用浏览器打开 index.html 即可。推荐用本地服务器:

# Python
python -m http.server 8080

# Node.js
npx serve .

然后访问 http://localhost:8080

技术栈

  • 纯 HTML + CSS + JavaScript(无框架)
  • Canvas API 进行图片编解码
  • createImageBitmap 自动修正 EXIF 方向
  • libheif-js(按需加载)解码 HEIC/HEIF
  • JSZip(按需加载)打包下载
  • Service Worker + Web App Manifest 实现 PWA 离线

隐私说明

  • 所有图片处理均在用户浏览器本地完成
  • 不会上传任何图片数据到服务器
  • HEIC 解码库和 JSZip 通过 CDN 加载(仅首次使用对应功能时)
  • 不收集任何用户数据,不使用分析工具

贡献

欢迎提交 Issue 和 Pull Request!详见 CONTRIBUTING.md。

许可证

MIT License


English

Features

  • Multi-format output: WebP, AVIF, JPEG, PNG, or keep original format
  • Multi-format input: JPG, PNG, WebP, AVIF, GIF, BMP, HEIC/HEIF (iPhone photos)
  • Local processing: All images processed in-browser via Canvas, never uploaded to any server
  • Batch processing: Select multiple images at once, or recursively process entire folders
  • Drag & drop: Drop files or folders anywhere on the page
  • Quality control: Real-time slider with instant preview
  • Resize: Set max dimension to downscale large photos proportionally
  • EXIF orientation fix: Automatically corrects photo orientation from mobile cameras
  • ZIP download: Download all compressed images as a single ZIP
  • Copy to clipboard: Copy compressed images directly
  • PWA support: Installable to desktop, works offline
  • Zero-build deployment: Single HTML file, works on any static host

Usage

Open index.html in a browser after deployment, or enable GitHub Pages for this repository.

Run locally

No build tools needed. Open index.html directly, or use a local server:

# Python
python -m http.server 8080

# Node.js
npx serve .

Then visit http://localhost:8080

Tech Stack

  • Pure HTML + CSS + JavaScript (no framework)
  • Canvas API for image encoding/decoding
  • createImageBitmap for automatic EXIF orientation correction
  • libheif-js (lazy-loaded) for HEIC/HEIF decoding
  • JSZip (lazy-loaded) for ZIP packaging
  • Service Worker + Web App Manifest for PWA offline support

Privacy

  • All image processing happens locally in the user's browser
  • No image data is ever uploaded to a server
  • HEIC decoder and JSZip are loaded via CDN only when corresponding features are used
  • No analytics, no user data collection

Contributing

Issues and Pull Requests are welcome! See CONTRIBUTING.md.

License

MIT License

About

图压 PicShrink · 纯前端在线图片压缩与格式转换工具(WebP/AVIF/JPEG/PNG/HEIC),图片本地处理不上传,零服务器成本,支持 PWA 离线使用。

Topics

Resources

Contributing

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages