Sử dụng bộ sưu tập để sắp xếp ngăn nắp các trang
Lưu và phân loại nội dung dựa trên lựa chọn ưu tiên của bạn.
WebP là một định dạng hình ảnh hiện đại, cung cấp tính năng nén không tổn hao và có tổn hao vượt trội cho hình ảnh trên web. Khi sử dụng WebP, các quản trị viên trang web và nhà phát triển web có thể tạo ra những hình ảnh nhỏ và phong phú hơn để trang web chạy nhanh hơn.
Hình ảnh WebP không suy hao có kích thước nhỏ hơn 26% so với hình ảnh PNG. Hình ảnh có hao tổn WebP có kích thước nhỏ hơn 25-34% so với các hình ảnh JPEG có thể so sánh ở các chỉ số chất lượng SSIM tương đương.
WebP không suy hao hỗ trợ độ trong suốt (còn gọi là kênh alpha) với chi phí chỉ thêm 22% byte. Đối với các trường hợp khi nén RGB hao tổn được chấp nhận, thì WebP hao tổn cũng hỗ trợ độ trong suốt, thường tạo ra kích thước tệp nhỏ hơn 3 lần so với PNG.
Hình ảnh WebP động hỗ trợ cả chế độ hao tổn, không hao tổn và độ trong suốt, giúp giảm kích thước so với GIF và APNG.
Phương thức nén WebP có tổn hao sử dụng phương pháp mã hoá dự đoán để mã hoá hình ảnh, cũng là phương thức mà bộ mã hoá và giải mã video VP8 sử dụng để nén các khung hình chính trong video. Mã hoá dự đoán sử dụng các giá trị trong các khối pixel lân cận để dự đoán các giá trị trong một khối, sau đó chỉ mã hoá sự khác biệt.
Tính năng nén WebP không tổn hao sử dụng các mảnh hình ảnh đã xem để tái tạo chính xác các pixel mới. Ứng dụng này cũng có thể sử dụng bảng màu cục bộ nếu không tìm thấy kết quả trùng khớp thú vị.
Tệp WebP bao gồm dữ liệu hình ảnh VP8 hoặc VP8L và một vùng chứa dựa trên RIFF. Thư viện libwebp độc lập đóng vai trò là một phương thức triển khai tham chiếu cho thông số kỹ thuật WebP và có sẵn trong kho lưu trữ git của chúng tôi hoặc dưới dạng tệp tarball.
Hỗ trợ WebP
WebP được hỗ trợ gốc trong Google Chrome, Safari, Firefox, Edge, trình duyệt
Opera và nhiều công cụ và thư viện phần mềm khác. Nhà phát triển cũng đã thêm tính năng hỗ trợ cho nhiều công cụ chỉnh sửa hình ảnh.
WebP bao gồm thư viện mã hoá và giải mã gọn nhẹ libwebp và các công cụ dòng lệnh cwebp và dwebp để chuyển đổi hình ảnh sang và từ định dạng WebP, cũng như các công cụ để xem, kết hợp và tạo ảnh động WebP. Bạn có thể tìm thấy toàn bộ mã nguồn trên trang tải xuống.
Tải trình chuyển đổi WebP xuống
Chuyển đổi bộ sưu tập yêu thích của bạn từ PNG và JPEG sang WebP bằng cách tải công cụ chuyển đổi cwebp được biên dịch trước xuống cho Linux, Windows hoặc macOS.
Hãy cho chúng tôi biết trải nghiệm của bạn trên danh sách gửi thư của dự án.
[[["Dễ hiểu","easyToUnderstand","thumb-up"],["Giúp tôi giải quyết được vấn đề","solvedMyProblem","thumb-up"],["Khác","otherUp","thumb-up"]],[["Thiếu thông tin tôi cần","missingTheInformationINeed","thumb-down"],["Quá phức tạp/quá nhiều bước","tooComplicatedTooManySteps","thumb-down"],["Đã lỗi thời","outOfDate","thumb-down"],["Vấn đề về bản dịch","translationIssue","thumb-down"],["Vấn đề về mẫu/mã","samplesCodeIssue","thumb-down"],["Khác","otherDown","thumb-down"]],["Cập nhật lần gần đây nhất: 2025-08-08 UTC."],[[["\u003cp\u003eWebP is a modern image format that offers superior lossless and lossy compression for images on the web, resulting in smaller and richer images.\u003c/p\u003e\n"],["\u003cp\u003eWebP lossless images are 26% smaller than PNGs and lossy images are 25-34% smaller than comparable JPEGs at equivalent quality.\u003c/p\u003e\n"],["\u003cp\u003eWebP supports transparency in both lossless and lossy modes, providing significant size reductions compared to PNGs.\u003c/p\u003e\n"],["\u003cp\u003eAnimated WebP images offer reduced file sizes compared to GIFs and APNGs while supporting lossy, lossless, and transparency.\u003c/p\u003e\n"],["\u003cp\u003eWebP is natively supported in major web browsers like Chrome, Safari, Firefox, Edge, and Opera, as well as many other tools and software libraries.\u003c/p\u003e\n"]]],["WebP, a modern image format, offers superior lossless and lossy compression compared to PNGs and JPEGs. Lossless WebP images are 26% smaller than PNGs, and lossy WebP images are 25-34% smaller than JPEGs. WebP supports transparency, even in lossy formats, and animated WebP images. It employs predictive coding for lossy compression and utilizes existing image fragments for lossless compression. Supported by major browsers and tools, WebP includes the `libwebp` library and `cwebp`/`dwebp` conversion tools.\n"],null,["# An image format for the Web\n\nWebP is a modern **image format** that provides superior **lossless and\nlossy** compression for images on the web. Using WebP, webmasters and web\ndevelopers can create smaller, richer images that make the web faster.\n\nWebP lossless images are [26% smaller](/speed/webp/docs/webp_lossless_alpha_study#results) in size compared to PNGs. WebP\nlossy images are [25-34% smaller](/speed/webp/docs/webp_study) than comparable JPEG images at equivalent\n[SSIM](https://en.wikipedia.org/wiki/Structural_similarity) quality index.\n\nLossless WebP **supports transparency** (also known as alpha channel) at a\ncost of just [22% additional bytes](/speed/webp/docs/webp_lossless_alpha_study#results). For cases when lossy RGB compression\nis acceptable, **lossy WebP also supports transparency**, typically providing\n3× smaller file sizes compared to PNG.\n\nLossy, lossless and transparency are all supported in **animated WebP images**,\nwhich can provide reduced sizes compared to GIF and APNG.\n\n- **[More Info for Webmasters](/speed/webp/faq#how_can_i_detect_browser_support_for_webp)**\n\nHow WebP Works\n--------------\n\nLossy WebP compression uses predictive coding to encode an image, the same\nmethod used by the VP8 video codec to compress keyframes in videos. Predictive\ncoding uses the values in neighboring blocks of pixels to predict the values\nin a block, and then encodes only the difference.\n\nLossless WebP compression uses already seen image fragments in order to\nexactly reconstruct new pixels. It can also use a local palette if no\ninteresting match is found.\n\n- **[WebP Compression Techniques in Detail](/speed/webp/docs/compression)**\n\nA WebP file consists of [VP8](https://datatracker.ietf.org/doc/rfc6386/) or [VP8L](/speed/webp/docs/webp_lossless_bitstream_specification) image data, and a container\nbased on [RIFF](/speed/webp/docs/riff_container). The standalone `libwebp` library serves as a reference\nimplementation for the WebP specification, and is available from\n[our git repository](https://www.webmproject.org/code/#libwebp-webp-image-library) or as a [tarball](/speed/webp/download).\n\nWebP Support\n------------\n\nWebP is natively supported in Google Chrome, Safari, Firefox, Edge, the Opera\nbrowser, and by [many other](/speed/webp/faq#which_web_browsers_natively_support_webp) tools and software libraries. Developers have\nalso added support to a variety of image editing tools.\n\nWebP includes the lightweight encoding and decoding library [`libwebp`](/speed/webp/docs/api)\nand the command line tools [`cwebp`](/speed/webp/docs/cwebp) and [`dwebp`](/speed/webp/docs/dwebp) for converting\nimages to and from the WebP format, as well as tools for viewing, muxing and\nanimating WebP images. The full source code is available on the\n[download](/speed/webp/download) page.\n\nWebP Converter Download\n-----------------------\n\nConvert your favorite collection from PNG and JPEG to WebP by downloading the\nprecompiled `cwebp` conversion tool for [Linux, Windows or macOS](/speed/webp/docs/precompiled).\n\nTell us your experience on the project's [mailing list](https://groups.google.com/a/webmproject.org/group/webp-discuss)."]]