跳到正文
工具

WordPress Image Size Lab

Drop an image in. See every copy WordPress will make of it.

在你的浏览器里运行。什么都不上传。

Drop an image here

or click to choose one

Your file is read in your browser and never uploaded. There is no size limit and no daily quota, because there is no server to pay for.

关于WordPress Image Size Lab

Upload an image and see every derivative WordPress will actually generate — thumbnail, medium, large, 1536, 2048, and the -scaled copy — at real dimensions with real crop boxes. Then download the set, or copy the add_image_size() code to change it.

FAQ

常见问题

WordPress 实际上会创建哪些图片尺寸?

在一个原生安装上,六个:thumbnail(150×150,硬裁切)、medium(300×300)、medium_large(768w)、large(1024×1024)、1536×1536 和 2048×2048。如果你的图片超过 2560px,还会多一个 “-scaled” 副本。每个插件和主题都能再注册更多——WooCommerce 就加了三个。

为什么我的图片上传到 WordPress 后变模糊了?

几乎总是那个 “-scaled” 行为在作怪。从 5.3 起,WordPress 会把任何最长边超过 2560px 的上传图片自动压缩缩小,并用那个副本代替你的原图。你的原图还在服务器上;只是从来不被使用。把你的图片拖进上面的工具,它会告诉你是不是你遇上了这种情况。

这个工具显示的文件大小准确吗?

尺寸和裁切框是精确的——它们来自 WordPress 使用的同一套规则。文件大小是估算值:你的浏览器用的 JPEG 编码器和你服务器上的不一样(WordPress 用 GD 或 Imagick,并以质量 82 重新编码),所以真实的文件会有出入。比起悄悄往对我们有利的方向取整,我们宁愿把这个告诉你。