Questions tagged [webp]

WebP is an open standard for image encoding. It is intended to provide support for animation, metadata, lossless compression, and transparency without the patent or license restrictions of existing formats.

WebP is a new image format that provides lossless and lossy compression for images on the web. WebP lossless images are 26% smaller in size compared to PNGs. WebP lossy images are 25-34% smaller in size compared to JPEG images at equivalent SSIM index. WebP supports lossless transparency (also known as alpha channel) with just 22% additional bytes. Transparency is also supported with lossy compression and typically provides 3x smaller file sizes compared to PNG when lossy compression is acceptable for the red/green/blue color channels.

754 questions
4
votes
4 answers

iOS: Display WebP image in UIWebView

While using Google WebP image format in my iOS App, I find Google's library is good at displaying WebP image in native code. Now I want to use WebP in my webapp too, but UIWebView doesn't support. Any ideas to implement it?
keywind
  • 1,135
  • 14
  • 24
4
votes
1 answer

Android: lossless WEBP compression

I am compressing an image in the WEBP-format with the following code: bitmap.compress(Bitmap.CompressFormat.WEBP, 100, outputStream) Although I am using highest quality-settings, it looks like the image is not compressed lossless but…
Alex
  • 569
  • 5
  • 21
4
votes
0 answers

Call to undefined function imagecreatefromwebp() on PHP 5.5.9

I am getting this error on PHP 5.5.9, which is supposed to come with webp. Am I doing something wrong or does webp need to be installed separately ? Call to undefined function imagecreatefromwebp()
Alex
  • 4,674
  • 5
  • 38
  • 59
4
votes
5 answers

How to load a webp image with SDWebImage?

I'm using SDWebImage to load images in my iOS app and I now want to use the webp format. Here's my first try : NSURL *url = [NSURL URLWithString:@"http://www.gstatic.com/webp/gallery/2.webp"]; [self.imageView setImageWithURL:url …
Alexis
  • 16,629
  • 17
  • 62
  • 107
4
votes
1 answer

Why does Google Images Service convert my WEBP images into JPG when serving them?

I have a number of PNG images with alpha that I have converted to WEBP using XnConvert. The conversion itself goes fine and alpha channel is maintained, until uploaded to the BlobStore Before upload to the blobstore, it looks like this: and after…
Joachim
  • 901
  • 8
  • 18
4
votes
0 answers

Why does Imagemagick produce strange results when converting to WEBP format?

I was experimenting with JPEG2000 and WEBP through Imagemagick. They were both giving me much better compression levels than I had gotten from JPEG in GIMP, with WEBP doing better than JPEG2000. But when I changed the input image from a JPEG to a…
Wutaz
  • 362
  • 3
  • 19
4
votes
1 answer

How to create a lossless WebP image using toDataURL?

I'm trying out the WebP image format in Chrome using the canvas element. On MDN I saw that toDataURL accepts a second argument representing the quality of the resulting image. I'd like to generate a lossless WebP image of a canvas element. However,…
pimvdb
  • 151,816
  • 78
  • 307
  • 352
3
votes
3 answers

How to detect browsers supporting WebP and how to serve them WebP pictures?

Seen the amazing size reduction of WebP pictures (about 28% smaller than "pngcrushed" PNG for lossless + alpha pictures), we'd like to serve WebP pictures to browsers supporting WebP. How can I detect from a Java webapp server if the client's…
Cedric Martin
  • 5,945
  • 4
  • 34
  • 66
3
votes
1 answer

Save a webp file with System.Drawing.Imaging generates a big file size or encoder doesn't exists

So I'm working with .NET 7 since System.Drawing.Imaging can (or seems to be) save a file as webp file with the following code: pictureBox1.Image = image; //image is a Bitmap image.Save(folderpath, ImageFormat.Webp); Pretty…
Leandro Bardelli
  • 10,561
  • 15
  • 79
  • 116
3
votes
2 answers

How to replace old image with converted webp image in Wordpress media library

I have this hook in Wordpress that will convert any uploaded PNGs or JPEGS to WebP images: add_filter( 'wp_handle_upload', 'create_webp' ); function create_webp($file) { if ($file['type'] === "image/png") { // Create and save …
Alex Douglas
  • 534
  • 1
  • 8
  • 21
3
votes
0 answers

Linked-in webp support

As of this article posted in 2021, it looks like webp is not supported for Linked-In posts: https://beamtic.com/webp-on-linkedin I have a website with webp compressed images and my images are not showing in the posts. Does Linked-In still not have…
Jason O
  • 110
  • 6
3
votes
0 answers

Getting actual frame from animated webp using cwebp/libwebp

I am trying to get individual frames of an animated webp file. However, the frames obtained in this way has different image sizes and some frames have alpha channels: WebPData rawData = { webpData.data() , webpData.size() }; struct WebPDemuxer*…
user8624414
3
votes
1 answer

Why my Nextjs component renders as jpg instead of Webp or Avif?

With Nextjs the expected outcome is to see the Image component rendered as .WebP or .AVIF but it remains jpg - Below is my next.config.js /** @type {import('next').NextConfig} */ module.exports = { images: { domains: ['cdn.sanity.io'], …
3
votes
0 answers

java8 ImageIO does not support webp image format

I need to create thumbnail starting from a WebP image but ImageIO doesn't support this format. Are there any library that allow me to do something like this ? String format = getImageFormat(imageFile); Iterator readers =…
user7469506
  • 33
  • 1
  • 3
3
votes
2 answers

Is it possible to losslessly crop/scale a webp similar to jpegtran

Jpegtran allows fast lossless cropping and scaling of jpegs with certain constraints. Is there a similar tool to do the same for webp files? I couldn't find one. Is it even possible?
smremde
  • 1,800
  • 1
  • 13
  • 25