惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

B
Blog RSS Feed
WordPress大学
WordPress大学
博客园_首页
罗磊的独立博客
D
Docker
N
Netflix TechBlog - Medium
博客园 - Franky
Hugging Face - Blog
Hugging Face - Blog
D
DataBreaches.Net
I
InfoQ
L
LangChain Blog
GbyAI
GbyAI
V
V2EX
博客园 - 聂微东
P
Proofpoint News Feed
博客园 - 【当耐特】
腾讯CDC
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
量子位
Martin Fowler
Martin Fowler
有赞技术团队
有赞技术团队
U
Unit 42
博客园 - 司徒正美
大猫的无限游戏
大猫的无限游戏

DEV Community

Authentication Security Deep Dive: From Brute Force to Salted Hashing (With Java Examples) Why AI Systems Don’t Fail — They Drift Spilling beans for how i learn for exam😁"Reinforcement Learning Cheat Sheet" I Replaced Chrome with Safari for AI Browser Automation. Here's What Broke (and What Finally Worked) How Python Borrows Other People's Work The $40 Architecture: Processing 1 Billion API Requests with 99.99% Uptime Vibe Coding: A Workflow Guide (From Zero to SaaS) Most webhook security guides protect the wrong side. The scary part is delivery. Headless CMS for TanStack Start: Build a Blog with Cosmic EU Age Verification App "Hacked in 2 Minutes" — What Actually Happened Comfy Cloud’s delete function does not actually remove files Running AI Models on GPU Cloud Servers: A Beginner Guide Event-driven media intelligence with AWS Step Functions and Bedrock I scored 500 AI prompts across 8 quality dimensions — here's what broke How to Call Google Gemini API from Next.js (Free Tier, No Backend Needed) The Portal Protocol: Reclaiming Human Connection in the Age of AI How to Fix Your Team's Scattered Knowledge Problem With a Self-Hosted Forum Intro to tc Cloud Functors: A Graph-First Mental Model for the Modern Cloud Designing Multi-Tenant Backends With Both Ownership and Team Access I Built a Neumorphic CSS Library with 77+ Components — Here's What I Learned PostgreSQL Performance Optimization: Why Connection Pooling Is Critical at Scale Cómo construí un SaaS multi-rubro para gestionar expensas en Argentina con FastAPI + Vue 3 🚀 I Built an Ethical Hacking Scanner Tool – Open Source Project I Replaced /usage and /context in Claude Code With a Single Statusline A Pythonic Way to Handle Emails (IMAP/SMTP) with Auto-Discovery and AI-Ready Design I Collected 8.9 Million Polymarket Price Points — Here's What I Found About How Markets Really Move EcoTrack AI — Carbon Footprint Tracker & Dashboard Everyone's Using AI. No One Agrees How. 5 self-hosted ebook managers worth trying in 2026 Building Your First AI Agent with LangChain: From Chatbot to Autonomous Assistant
I Benchmarked 17 Image Conversions on My Production Serve...
Serhii Kalyna · 2026-06-20 · via DEV Community

I run Convertify, a free image converter built on Rust and libvips. Last week I decided to stop guessing about format performance and actually measure it. I took 50 real images (26 PNGs, 24 iPhone HEIC photos), ran 17 conversions through the production pipeline, and recorded every file size and encode time.

Some results confirmed what everyone says. Others did not.

The three results that surprised me

1. Converting HEIC to JPG makes files 14% bigger, not smaller.

This one hurt. "Convert iPhone photos to JPG" is probably the most common advice on the internet. But HEIC wraps the HEVC codec, which compresses roughly 2x better than JPEG. Going from a better codec to a worse one means the file grows. Every time.

If you actually want smaller iPhone photos: HEIC to WebP saves 43%, HEIC to AVIF saves 57%.

2. AVIF encodes 7x slower than WebP for 10% more compression.

AVIF Q63: 55 KB, 1.30s per image.
WebP Q80: 61 KB, 0.19s per image.

That is a 10% size difference for a 7x speed penalty. For a single hero image, nobody cares. For a batch pipeline processing thousands of product photos, that is the difference between 3 minutes and 21 minutes.

3. PNG at 600 DPI is smaller than PNG at 300 DPI when rasterizing PDFs.

This was the weirdest one. I was benchmarking PDF-to-image and noticed PNG output shrank from 2,221 KB at 300 DPI to 1,660 KB at 600 DPI. I spent an hour convinced I had a bug.

Turns out it is a real property of PNG encoding. Higher DPI renders smoother gradients between adjacent pixels, and PNG's prediction filters (Paeth, sub, up) compress smooth gradients dramatically better than the sharp edges you get at lower resolutions. Not a bug. Just PNG being PNG.

The quick reference table

Conversion Size change Speed
JPG to WebP Q80 -64% 0.19s
JPG to AVIF Q63 -68% 1.30s
PNG to WebP Q80 -92% 0.21s
PNG to JPG Q85 -86% 0.07s
HEIC to JPG Q85 +14% 1.90s
HEIC to WebP Q80 -43% 5.64s
HEIC to AVIF Q63 -57% 14.52s
WebP to JPG Q85 +60% 0.09s
AVIF to JPG Q85 +80% 0.15s

What I actually recommend

For most websites: WebP Q80. 64% smaller than JPG, fast to encode, universal browser support since 2020.

For maximum compression with no time pressure: AVIF Q63. 68% smaller than JPG but 7x slower to encode.

For iPhone photos: Do not convert to JPG. Go straight to WebP or AVIF. JPG is a downgrade in both efficiency and file size.

The full benchmark

The complete data with PDF rasterization benchmarks, DPI comparisons, and methodology is in the full benchmark post on Convertify. Every number was measured on June 18, 2026 on the production Rust + libvips server. No theoretical figures, no borrowed data.


Week 14 of building Convertify in public. Previous posts in the series cover the SSG migration, libvips segfaults, and why I stopped trusting my own landing page copy.