如果您尝试从网络上保存任何图像,您可能已经注意到一种名为WebP的不熟悉的图像格式。此图像文件格式旨在替代JPEG、PNG和GIF文件等其他格式,但尚未成为广泛的选择。
如果您以WebP图像格式下载数据,您可能很难打开它。幸运的是,您可以使用许多图像转换器(numerous image converters)将其转换为更实用的格式。
什么是 WebP?(What Is WebP?)
WebP于 2010 年首次发布,但直到2018 年 4 月(April 2018)才发布。尽管可能很难与之交互,但WebP格式有一些好处。首先(First),它支持有损图像和无损图像压缩。换句话说,可以将数据压缩到小得多的大小,但可以完美地重建,或者以牺牲一些图像质量为代价进一步压缩。
WebP的主要好处是它可以生成与许多流行格式相同的图像质量的文件,但文件大小更小。不过,它不仅适用于图像:WebP还可用于动画文件以及ICC配置文件、XMP和Exif元数据等。WebP还支持透明度,也称为 Alpha 通道。
哪些浏览器支持 WebP?(What Browsers Support WebP?)
(Google Chrome)如果您使用的是最新版本,Google Chrome对有损、无损和动画格式提供原生WebP支持。(WebP)Firefox、Opera和Microsoft Edge也支持所有这些格式。
(Pale Moon)来自Mozilla(Mozilla)的流行开源浏览器Pale Moon以及适用于Android的(Android)Google Chrome浏览器都支持WebP有损和无损格式。
如果您仍在使用Internet Explorer(由于缺乏支持,这是个坏主意),那么您就不走运了。浏览器不支持 WebP 。
有些人仍然错误地认为Safari浏览器不支持WebP,但苹果在(Apple)Mac和 iOS 设备的Safari 14中添加了对格式的支持。
WebP 是如何工作的?(How Does WebP Work?)
图像压缩多年来一直是Internet的常见部分,但不同的方法有不同的方法。WebP是在不降低图像质量的情况下减小图像大小的最先进方法之一。
它的工作方式取决于压缩的类型(type of compression)。有损 WebP(Lossy WebP)压缩利用一种称为预测编码的工具,该工具通过查看像素值来预测其周围的值。它对这些值的差异进行编码。在有效减小文件大小的同时,它也会降低图像质量。
无损 WebP(Lossless WebP)压缩在减小图像尺寸方面的效果稍差,但保持了相同的质量水平。它通过识别图像片段来重建新像素来工作,或者如果找不到图像片段,则使用匹配的调色板。
根据用例的不同,WebP可以使文件大小比PNG小三倍。
使用 WebP 有什么好处?(What Are the Benefits of Using WebP?)
WebP流行并广受欢迎有几个很好的原因,其中第一个是卓越的压缩率。换句话说,WebP图像比(WebP)JPG等其他文件类型占用的带宽更少;也就是说,WebP图像仅在浏览器支持时才交付,而JPEG图像或等效图像在浏览器不支持时交付。
较小的(Smaller)图像尺寸会加快网页的加载时间,尤其是在难以加载高质量图像的机器上。如果您的目标是最大限度地优化您的网站,WebP文件是您可以使用的最佳工具之一。
使用 WebP 的缺点是什么?(What Are the Drawbacks of Using WebP?)
WebP的第一大障碍是兼容性。虽然大多数主要浏览器都支持WebP图像文件,但并非所有浏览器都支持。值得庆幸(Thankfully)的是,WebP不再受操作系统的限制,并且可在Linux 和 macOS(Linux and macOS)上使用。
另一个缺点是,如果您使用有损格式,仍然会有一些图像质量损失。文件大小变得更小,但由于压缩算法的工作方式,无法避免至少一些质量下降。
最后一个障碍在于使用WebP与WordPress等内容管理系统的兼容性。如果您想将在线图片放入媒体库,您可能会发现WordPress不接受该文件类型。根据WordPress的说法,该软件 5.8 版支持WebP的方式与支持PNG文件和JPEG文件的方式相同,但如果您尚未更新您的网站,则可能会出现问题。
如何将 WebP 图像另存为其他格式(How to Save a WebP Image as a Different Format)
保存图像的传统方式并不总是适用于WebP,至少在您缺少正确工具的情况下是这样。当您选择另存为(Save As)时,您可能会发现您没有任何其他图像格式选项。
转换插件(Conversion Plugins)
一个快速的解决方法是安装一个转换插件(conversion plugin)。像这样的插件可以让你在保存之前在浏览器中将WebP转换为类似PNG图像的东西。(PNG)一种选择是在 Chrome 商店中将图像另存为类型(Save image as Type)。
使用油漆(Use Paint)
如果您使用的是Windows,则可以使用Microsoft Paint打开下载的WebP文件并将其转换为另一种格式,而无需下载其他软件。
使用不同的浏览器(Use a Different Browser)
如果您在不支持该格式的浏览器中加载WebP图像,则会加载另一种文件类型。从这里,您可以像往常一样将图像保存为JPG或PNG文件。
WebP可能很烦人,尤其是当您从(WebP)Internet 上(Internet)保存大量图像时,但它也可以为世界各地的网络主机带来福音。遇到也不要失去冷静;只需几个步骤,您就可以绕过最大的问题。
What Is the WebP Format and How to Avoid It
If yоu’ve tried to save any images off the web, you might have noticed an unfamilіar image format called WebP. Thiѕ image file format is meant to be a replacement for other formats like ЈPEG, РNG, and GIF files, but it hasn’t yet become a widespread option.
If you download data in the WebP image format, you might have a hard time opening it. Luckily, there are numerous image converters that you can use to transform it into a format that’s a bit more usable.
What Is WebP?
WebP was first announced in 2010, but wasn’t released until April 2018. Though it can be hard to interact with, there are benefits to the WebP format. First of all, it supports both lossy image and lossless image compression. In other words, data can be compressed to significantly smaller sizes yet perfectly reconstructed, or compressed even further at the cost of some image quality.
The primary benefit of WebP is that it can yield files of the same image quality as many popular formats with a smaller file size. It’s not just for images, though: WebP can also be used for animation files as well as ICC profiles, XMP and Exif metadata, and more. WebP also supports transparency, otherwise known as the alpha channel.
What Browsers Support WebP?
Google Chrome has native WebP support for lossy, lossless, and animation formats, provided you’re using the latest versions. Firefox, Opera, and Microsoft Edge also support all of these formats.
Pale Moon, a popular open source browser derived from Mozilla, as well as the Google Chrome for Android browser both support WebP lossy and lossless formats.
If you’re still using Internet Explorer – a bad idea due to the lack of support – you’re out of luck. There is no WebP support for the browser.
Some people still mistakenly believe that the Safari browser does not support WebP, but Apple added support for the format in Safari 14 for Mac and iOS devices.
How Does WebP Work?
Image compression has been a common part of the Internet for many years now, but different methods have different approaches. WebP is one of the most advanced ways to reduce image size without lowering image quality.
The way it works depends on the type of compression. Lossy WebP compression utilizes a tool called predictive coding, which looks at pixel values to predict the values around it. It encodes the difference in these values. While effective at reducing file size, it also reduces image quality.
Lossless WebP compression is slightly less effective at reducing image size, but maintains the same level of quality. It works by identifying image fragments to reconstruct new pixels, or makes use of matching color palettes if no image fragment can be found.
Depending on the use case, WebP can result in file sizes as much as three times smaller than PNG.
What Are the Benefits of Using WebP?
WebP caught on and spread in popularity for several good reasons, the first of which is the superior compression rates. In other words, WebP images take up less bandwidth than another file type like JPG; that said, WebP images are delivered only when the browser supports it, while a JPEG image or equivalent is delivered if the browser doesn’t support it.
Smaller image sizes speed up the load times of web pages, especially on machines that struggle to load high-quality images. If you’re aiming for maximum optimization of your website, a WebP file is one of the best tools available to you.
What Are the Drawbacks of Using WebP?
The number one obstacle to WebP is compatibility. While most of the primary browsers support WebP image files, not all do. Thankfully, WebP is no longer limited by operating system and is available on both Linux and macOS.
Another downside is that some image quality loss remains if you use the lossy format. The file size becomes much smaller, but due to the way the compression algorithm works, there’s no way to avoid at least some drop in quality.
A final obstacle lies in the compatibility of shifting using WebP with content management systems like WordPress. If you want to drop an online image into your media library, you might find that WordPress won’t accept the file type. According to WordPress, version 5.8 of the software supports WebP in the same way that it supports PNG files and JPEG files, but if you haven’t updated your website, it can be a problem.
How to Save a WebP Image as a Different Format
The traditional way of saving images doesn’t always work with WebP, at least not if you’re missing the right tools. When you select Save As, you may find that you don’t have any other image format options.
Conversion Plugins
A quick fix is to install a conversion plugin. Plugins like this will let you convert WebP to something like a PNG image right in your browser before you save it. One option is Save image as Type in the Chrome store.
Use Paint
If you’re on Windows, you can use Microsoft Paint to open a downloaded WebP file and convert it to another format without downloading additional software.
Use a Different Browser
If you load a WebP image in a browser that doesn’t support the format, then another file type will be loaded instead. From here, you can save the image like you normally would as a JPG or PNG file.
WebP can be irritating, especially if you save a lot of images off the Internet, but it can also be a boon to web hosts everywhere. Don’t lose your cool if you encounter it; with just a few steps, you can bypass the biggest issues with it.