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
0 answers

WebP fast compression

I would like to use WebP format because it compresses (encodes) images very good (good quality and small size) But on Android the next method to compress bitmap to WebP works quite slow 130-140 ms for bitmap with 640x360 resolution on device with…
user155
  • 775
  • 1
  • 7
  • 25
4
votes
2 answers

Lazyloading webp images - how to add the class

I am unable to lazy-load webp images because the class attribute is not seen by browser. I am running the audit in Chrome browser to speed up my site as much as possible and the next thing to be done is to make images off the screen to be…
zwora
  • 141
  • 3
  • 14
4
votes
1 answer

Combining lazysizes with WebP

I'm going through the Google Lighhouse audit of our site and most of the focus is on images. I'm currently trying to achieve 'Deter offscreen images' as described on the audit. I'm using lazysizes, as that's what Google seemed to recommend. I'm…
Sam Johnson
  • 742
  • 1
  • 8
  • 24
4
votes
3 answers

Converting a MOV to WEBP

I have a transparent video that I would like to include on my website with a background behind it. I am trying to convert it to .WEBP via ffmpeg. I have previously succeeded in converting it to .WEBM, but many browsers don't support it, so I thought…
user3469011
  • 59
  • 1
  • 4
4
votes
1 answer

How to Convert WebP image to Gif with Python?

I already tried this: from PIL import Image im = Image.open('this.webp') im.save('that.gif', 'gif', save_all=True) which is giving me this error TypeError: unsupported operand type(s) for &: 'tuple' and 'int' I have hundreds of webp images on my…
Azimjon Pulatov
  • 101
  • 2
  • 7
4
votes
1 answer

Play and pause on webp animated images

I need to implement play and pause control on web animated images which should play and pause on the same frame itself. Please tell me the solution if anybody know about this
4
votes
2 answers

How to convert user upload images to webp in ruby on rails

I want to convert user uploading images in webp for site performance. I know webp now support only on two browsers, Google Chrome and Opera. I am using carrierwave for image uploading to s3. Not find any support of converting image to webp in…
4
votes
1 answer

Android show animated WebP

I have an animated webp file that I took from the original AR Stickers APK which I'd like to show in my app for onboarding in ARCore. It looks like I can easily load the first frame of the webp file into an imageview but trying to decode it as a…
TheHebrewHammer
  • 3,018
  • 3
  • 28
  • 45
4
votes
2 answers

Using modernizer to detect webp support in browser

not sure where I'm going wrong here, but it seems straight forward. I'm trying to detect webp support. So I have gone to the modernizer site and checked the webp options then downloaded the script. I have added the script using wordpress functions…
Web Dev Guy
  • 1,693
  • 3
  • 18
  • 42
4
votes
1 answer

Imagecreatefromwebp(): WebP decode: fail to decode input data

I am trying to convert a webp file to JPEG using imagecreatefromwebp() but unfortunately, it throws me a warning: Warning: imagecreatefromwebp(): WebP decode: fail to decode input data. Here's my code $filename =…
Bishnu Dev
  • 117
  • 1
  • 12
4
votes
3 answers

why .webp larger than .png?

why .webp larger than .png? I Used ABIC program to convert png -> webp. But some of files are larger than origin png files. .webp file origin png file And diff-res is here. Two problems: Why png -> webp come larger? I don't feel size saving…
ZhangTengyuan
  • 1,295
  • 1
  • 8
  • 8
4
votes
1 answer

WebP support with AWS ElasticBeanstalk

I try to support the use of the webp format with EB, however it's not working as expected... I created a .config file in .ebextensions with this: commands: 01-command: command: wget…
4
votes
3 answers

Get webp image size in java

I need to extract the width and height of webp image in classic java I searched for libraries and found webp-imageio but it can't extract the image size For others formats like jpg/png/gif I'm using ImageIO that extracts the size from headers only…
Bouki
  • 1,349
  • 2
  • 14
  • 25
4
votes
0 answers

how can i decode animated webp with android 4.0+

Use webp like this Bitmap bitmap = BitmapFactory.decodeResource(getResources(), R.raw.webp); imageView.setImageBitmap(bitmap); webp is ok. but animated webp can not decode bitmap.
qluan
  • 94
  • 6
4
votes
2 answers

How to convert webp to png or jpg using java in windows?

I got bitbucket.org/luciad/webp-imageio to work in Ubuntu, but I can't get it to work in Windows. Here is what I do in Ubuntu: Download webp-imageio and libwebp source code (other versions can be found in the google webp downloads…
RTM
  • 163
  • 1
  • 9