{"id":"image-webp","mimeType":"image/webp","name":"WebP Image","shortName":"WebP","category":"Web","extensions":[".webp"],"description":"WebP is a modern image format developed by Google that provides superior lossy and lossless compression for web images, with full support for transparency and animation — at smaller file sizes than JPEG or PNG.","seo":{"title":"image/webp MIME Type | Complete Developer Reference \u0026 Magic Bytes","description":"Complete reference for the image/webp MIME type: magic bytes, browser support matrix, HTTP headers, developer snippets, and technical specifications for WebP.","faqs":[{"question":"What is the magic byte for WebP?","answer":"The magic bytes for WebP are 52 49 46 46 (RIFF) followed by 57 45 42 50 (WEBP). The full signature is RIFF....WEBP."},{"question":"Does WebP support transparency?","answer":"Yes, WebP supports full alpha channel transparency in both lossy and lossless modes."},{"question":"Which browsers support WebP?","answer":"WebP is supported in Chrome 32+, Firefox 65+, Safari 14+, and Edge 18+. Internet Explorer does not support WebP."}]},"index":{"compression":["Lossy","Lossless"],"browserSupport":{"score":5,"label":"Excellent"},"commonUses":["Websites","Ecommerce","Mobile Apps","CMS Images"]},"technical":{"magicBytes":{"hex":"52 49 46 46 XX XX XX XX 57 45 42 50","ascii":"RIFF....WEBP"},"container":"RIFF","compressionAlgorithm":["VP8","VP8L"],"colorDepth":["8-bit"],"transparency":true,"animation":true,"metadata":{"exif":true,"xmp":true,"iccProfile":true},"alphaChannel":true,"progressiveLoading":false,"hdrSupport":false},"history":{"developer":"Google","released":"2010","specification":"WebP Container Specification"},"browserSupport":{"chrome":true,"chromeVersion":"32+","firefox":true,"firefoxVersion":"65+","safari":true,"safariVersion":"14+","edge":true,"edgeVersion":"18+","internetExplorer":false},"softwareSupport":[{"name":"Adobe Photoshop","logo":""},{"name":"GIMP","logo":"gimp.svg"},{"name":"ImageMagick","logo":"image-magic.webp"},{"name":"Figma","logo":""},{"name":"Canva","logo":""},{"name":"Squoosh","logo":"Squoosh.svg"},{"name":"Windows 11 Photos","logo":""}],"conversion":{"convertTo":["jpeg","png","avif"],"convertFrom":["jpeg","png","gif","avif"]},"developer":{"httpHeaders":[{"header":"Content-Type","value":"image/webp"}],"htmlAccept":"image/webp","fileDetection":["Check bytes 0–3 for RIFF signature (52 49 46 46)","Check bytes 8–11 for WEBP marker (57 45 42 50)"]},"prosCons":{"pros":["Superior lossy compression — 25–35% smaller than JPEG at equivalent quality","Supports both animation and full alpha transparency","Lossless mode available with smaller file sizes than PNG"],"cons":["Slower encoding than JPEG, especially for lossless","Not supported in Internet Explorer or very old browsers"]},"specifications":{"url":"https://developers.google.com/speed/webp/docs/riff_container","rfc":"","mimeAliases":["image/x-webp"]},"developerSnippets":{"python":"import imghdr\nprint(imghdr.what('file.webp')) # Outputs 'webp'","nodejs":"const FileType = require('file-type');\nconst type = await FileType.fromFile('file.webp');\nconsole.log(type.mime); // image/webp","go":"import \"net/http\"\n\nmimeType := http.DetectContentType(fileBytes)\nfmt.Println(mimeType) // image/webp","php":"$mime = mime_content_type('file.webp');\necho $mime; // image/webp"},"relatedFormats":["jpeg","png","avif"]}
