Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

产品创意: WebP-Server-Go 将 JPG/PNG 压缩成 WebP 格式的工具 #118

Open
lauer3912 opened this issue Jul 20, 2022 · 0 comments
Open

Comments

@lauer3912
Copy link
Owner

WebP 是一种同时提供了有损压缩与无损压缩的图片文件格式,目标是减少文件大小,但达到和 JPEG 格式几乎相同的图片质量。

生成单张 WebP 图片非常简单,批量转换也没太大难度。但是如果让点的图片可以无痛地以 WebP 格式输出,比如我们的博客上有 100+ 张图片转换该如何操作呢?

部分云服务商提供了转换服务,对于个人站点而言,为了同样在不改变站点原始 URL 的的情况下将图片压缩 WebP 格式输出,做到节省流量 + 提升页面加载速度的效果,WebP Server Go 应运而生。

使用 Go 编写的 WebP Server 是一个单一的 binary,性能优异,并且可以无缝转换 JPG/PNG 为 webp。只需要一次配置即可在不改变 URL 的情况下将站点图片以 WebP 格式输出,唯一改变的只有 content-type 和 length,无痛加速站点。原来下载 10M 的图片要花 10 秒钟,使用 WebP Server Go,只需要一秒钟就够了。

https://github.com/webp-sh/webp_server_go
https://github.com/LabsRS-Ref/webp_server_go

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant