AI 资讯
I built a JS image compressor that actually handles iPhone HEIC photos
If you've ever built a file upload feature, you've probably hit this: a user uploads a photo from their iPhone, and your app breaks. No preview, no compression, just a silent failure — because the file is .heic and browsers can't read it. HEIC is Apple's default photo format since iOS 11. Every iPhone photo taken today is HEIC. And virtually every JS image compression library just ignores the problem. I spent a weekend building PixSqueeze to fix that. The problem with HEIC in the browser Browsers use the <canvas> API to compress images. You draw the image onto a canvas, call canvas.toBlob() , and get a compressed file back. Clean, client-side, zero server cost. The problem: canvas.drawImage() only works if the browser can decode the image first. And no major browser can decode HEIC natively — not Chrome, not Firefox, not even Safari on macOS (Safari on iOS can, but that doesn't help your web app). So when a user picks a HEIC file, your image element fires onerror , your canvas stays blank, and your compression pipeline silently does nothing. The solution: server-side conversion, then client-side compression PixSqueeze handles this in two stages: Stage 1 — Server converts the format HEIC (and TIFF, camera RAW) files get sent to a small Express server. The server uses heic-convert running in a dedicated worker thread to convert to JPEG. Worker threads matter here — HEIC decoding is CPU-intensive WASM work, and running it on the main event loop would block every other request. Stage 2 — Client compresses the result The converted JPEG comes back to the browser, where the normal canvas-based compression pipeline takes over. Quality, resize, watermark hooks — all the usual options. The detection is important too. You can't just check file.type — iOS often sets HEIC files with an empty MIME type. PixSqueeze checks the ISO Base Media File Format magic bytes directly: async function isHeicFile ( file ) { const buffer = await file . slice ( 0 , 12 ). arrayBuffer (); const byt
开源项目
🔥 expressjs / express - Fast, unopinionated, minimalist web framework for node.
GitHub热门项目 | Fast, unopinionated, minimalist web framework for node. | Stars: 69,125 | 86 stars this week | 语言: JavaScript
开源项目
🔥 cube-js / cube - 📊 Cube Core is open-source semantic layer for AI, BI and emb
GitHub热门项目 | 📊 Cube Core is open-source semantic layer for AI, BI and embedded analytics | Stars: 20,120 | 8 stars today | 语言: Rust
开源项目
🔥 Ataraxy-Labs / sem - Semantic version control => entity-level diffs, blame, and i
GitHub热门项目 | Semantic version control => entity-level diffs, blame, and impact analysis on top of git. 26 languages via tree-sitter. Built for coding agents. | Stars: 2,526 | 149 stars today | 语言: Rust
开源项目
🔥 edwardkim / rhwp - 아래한글 hwp viewer and editor by rust and wasm
GitHub热门项目 | 아래한글 hwp viewer and editor by rust and wasm | Stars: 3,298 | 12 stars today | 语言: Rust
开源项目
🔥 cloud-hypervisor / cloud-hypervisor - A Virtual Machine Monitor for modern Cloud workloads. Featur
GitHub热门项目 | A Virtual Machine Monitor for modern Cloud workloads. Features include CPU, memory and device hotplug, support for running Windows and Linux guests, device offload with vhost-user and a minimal compact footprint. Written in Rust with a strong focus on security. | Stars: 5,755 | 9 stars today | 语言: Rust
开源项目
🔥 zizmorcore / zizmor - Static analysis for GitHub Actions
GitHub热门项目 | Static analysis for GitHub Actions | Stars: 5,558 | 21 stars today | 语言: Rust
开源项目
🔥 mantinedev / mantine - A fully featured React components library
GitHub热门项目 | A fully featured React components library | Stars: 31,230 | 7 stars today | 语言: TypeScript
开源项目
🔥 actions / checkout - Action for checking out a repo
GitHub热门项目 | Action for checking out a repo | Stars: 7,977 | 9 stars today | 语言: TypeScript
开源项目
🔥 ZuodaoTech / everyone-can-use-english - 人人都能用英语
GitHub热门项目 | 人人都能用英语 | Stars: 34,539 | 106 stars today | 语言: TypeScript
开源项目
🔥 rabbitmq / rabbitmq-server - Open source RabbitMQ: core server and tier 1 (built-in) plug
GitHub热门项目 | Open source RabbitMQ: core server and tier 1 (built-in) plugins | Stars: 13,696 | 3 stars today | 语言: JavaScript
开源项目
🔥 CodeWithHarry / Sigma-Web-Dev-Course - Source Code for Sigma Web Development Course
GitHub热门项目 | Source Code for Sigma Web Development Course | Stars: 11,451 | 17 stars today | 语言: JavaScript
开源项目
🔥 dataease / SQLBot - 🔥 基于大模型和 RAG 的智能问数系统,对话式数据分析神器。Text-to-SQL Generation via LL
GitHub热门项目 | 🔥 基于大模型和 RAG 的智能问数系统,对话式数据分析神器。Text-to-SQL Generation via LLMs using RAG. | Stars: 6,231 | 10 stars today | 语言: JavaScript
开源项目
🔥 robinebers / openusage - Burning through your subscriptions too fast? Paying for stuf
GitHub热门项目 | Burning through your subscriptions too fast? Paying for stuff you never use? Stop guessing. OpenUsage is free and open source. | Stars: 2,808 | 17 stars today | 语言: JavaScript
开源项目
🔥 blackmatrix7 / ios_rule_script - 分流规则、重写写规则及脚本。
GitHub热门项目 | 分流规则、重写写规则及脚本。 | Stars: 26,570 | 109 stars today | 语言: JavaScript
开源项目
🔥 jianchang512 / pyvideotrans - Translate the video from one language to another and embed d
GitHub热门项目 | Translate the video from one language to another and embed dubbing & subtitles. | Stars: 17,884 | 22 stars today | 语言: Python
开源项目
🔥 anthropics / claude-code-security-review - An AI-powered security review GitHub Action using Claude to
GitHub热门项目 | An AI-powered security review GitHub Action using Claude to analyze code changes for security vulnerabilities. | Stars: 5,132 | 51 stars today | 语言: Python
开源项目
🔥 francescopace / espectre - 🛜 ESPectre 👻 - Motion detection system based on Wi-Fi spectr
GitHub热门项目 | 🛜 ESPectre 👻 - Motion detection system based on Wi-Fi spectre analysis (CSI), with Home Assistant integration. | Stars: 8,014 | 112 stars today | 语言: Python
开源项目
🔥 maziyarpanahi / openmed - open-source healthcare ai
GitHub热门项目 | open-source healthcare ai | Stars: 1,599 | 165 stars today | 语言: Python
开源项目
🔥 x1xhlol / system-prompts-and-models-of-ai-tools - FULL Augment Code, Claude Code, Cluely, CodeBuddy, Comet, Cu
GitHub热门项目 | FULL Augment Code, Claude Code, Cluely, CodeBuddy, Comet, Cursor, Devin AI, Junie, Kiro, Leap.new, Lovable, Manus, NotionAI, Orchids.app, Perplexity, Poke, Qoder, Replit, Same.dev, Trae, Traycer AI, VSCode Agent, Warp.dev, Windsurf, Xcode, Z.ai Code, Dia & v0. (And other Open Sourced) System Prompts, Internal Tools & AI Models | Stars: 139,015 | 66 stars today | 语言: