{# canonical_base is the OWNING tenant's origin: all 16 Peasy domains serve the same catalogue, so a page rendered by a non-owner points its canonical at the owner instead of competing with it. Falls back to this site for static/self-owned pages. #}
🍋
Menu
Image

WebP

WebP Image Format

WebP คือรูปแบบภาพสมัยใหม่ที่พัฒนาโดย Google ซึ่งให้การบีบอัดที่ดีกว่า JPEG และ PNG โดยรักษาคุณภาพภาพที่เทียบเท่า รองรับทั้งการบีบอัดแบบสูญเสีย (lossy) และไม่สูญเสีย (lossless) รวมถึงภาพเคลื่อนไหวและความโปร่งใส

รายละเอียดทางเทคนิค

WebP ใช้การทำนายแบบบล็อกจาก VP8 (lossy) และอัลกอริทึมเอนโทรปีขั้นสูง (lossless) การบีบอัดแบบ lossy ให้ไฟล์เล็กกว่า JPEG 25-34% ที่ดัชนี SSIM เทียบเท่า การบีบอัดแบบ lossless ให้ไฟล์เล็กกว่า PNG 26% MIME type คือ image/webp รองรับบนเบราว์เซอร์หลักทั้งหมด (Chrome, Firefox, Safari 14+, Edge)

ตัวอย่าง

```javascript
// Image compression via Canvas
canvas.toBlob(
  blob => console.log(`Size: ${(blob.size/1024).toFixed(0)} KB`),
  'image/jpeg',
  0.8  // quality: 0.0 (smallest) to 1.0 (best)
);

// WebP output (25-34% smaller than JPEG)
canvas.toBlob(cb, 'image/webp', 0.8);
```

รูปแบบที่เกี่ยวข้อง

เครื่องมือที่เกี่ยวข้อง

คำศัพท์ที่เกี่ยวข้อง