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
131
votes
22 answers

Detecting WebP support

How can I detect support for WebP via Javascript? I'd like to use feature detection rather than browser detection if possible, but I can't find a way to do so. Modernizr (www.modernizr.com) doesn't check for it.
dieki
  • 2,435
  • 5
  • 23
  • 29
54
votes
1 answer

CLI command to convert Webp image(s) to JPG?

How do I convert webp files to JPG format?
lmlmlm
  • 699
  • 1
  • 5
  • 7
45
votes
5 answers

How to add webp support in Safari browser

In my site, I have added all images in webp format. All those images are showing properly in Chrome and Firefox browsers, but they do not show properly in Safari.
wohifov
  • 451
  • 1
  • 4
  • 4
37
votes
2 answers

Batch process .png to .webp

I have around 100 .png images, and all of them have to be converted to .webp (Google's image format). I am using Google's CLI tool. Any idea how to batch process them.
user2111006
  • 515
  • 1
  • 4
  • 6
32
votes
4 answers

Detect if browser supports WebP format? (server side)

There is already a thread about Detecting WebP support using client-side. How to detect WebP support using server side?
Gajus
  • 69,002
  • 70
  • 275
  • 438
29
votes
5 answers

Convert WEBP images to PNG by Linux command

I have many webp format images in a folder but with .jpg extension like abc-test.jpg It's a webp format image. I want it to convert in .png format with same name for that I have used this command and it worked find . -name "*.jpg" -exec dwebp {} -o…
OBAID
  • 1,299
  • 2
  • 21
  • 43
25
votes
1 answer

Convert images to webP using Pillow

I'm trying to convert .jpg images to webp format using PIL. I'm using the this code: from PIL import Image import glob, os for infile in glob.glob("*.jpg"): file, ext = os.path.splitext(infile) im = Image.open(infile).convert("RGB") …
Sudipta
  • 4,773
  • 2
  • 27
  • 42
24
votes
5 answers

WebP for Android

Are there any examples on how to use WebP for Android? Im trying to get a list of webp images and show them in a listview with an imageview. I know theres a libwebp api and I have integrated it into my Android project using the NDK, but how do I…
Faisal Abid
  • 8,900
  • 14
  • 59
  • 91
23
votes
4 answers

IIS server blocking access to .webp files

So I'm trying to add .webp image support for a WordPress site, which is run on IIS. Now the image exists on the server and the file name is correct but when I try to load the image via URL address in the browser I get the 404 error. 404 - File or…
Web Dev Guy
  • 1,693
  • 3
  • 18
  • 42
23
votes
3 answers

Best way to read and write webp format images in java

The normal Imageio Library says it cannot read the Webp format images. Are there any simple methods to read and webp images in java?
gillyb
  • 8,760
  • 8
  • 53
  • 80
20
votes
2 answers

JPG vs compressed JPG vs WEBP - why WEBP isn't the smallest one?

I have this image (photo taken by me on SGS 9 plus): Uncompressed JPG image. Its size is 4032 x 3024 and its weight is around 3MB. I compressed it with TinyJPG Compressor and its weight was 1.3MB. For PNG images I used Online-Convert and I saw webp…
Radek Anuszewski
  • 1,812
  • 8
  • 34
  • 62
19
votes
0 answers

Fallback for WebP poster in video tag, how?

I would use poster in WebP format, how I can make fallback to JPG for browsers that don't support WebP?
Vlad
  • 191
  • 1
  • 5
17
votes
8 answers

How to detect if webp images are supported via CSS

How do you detect in CSS if webp images are supported? .home-banner-background { background-image: url('img/banner.jpg'); } /*Here is an if statement that will check if webp is supported*/ { .home-banner-background { …
Erez Shlomo
  • 2,124
  • 2
  • 14
  • 27
17
votes
1 answer

Webp image not showing up on google Chrome via ASP.NET mvc

I have been trying to use Webp images on my website however they would show up as broken images on all browsers. I have tried a solution from dejanstojanovic (I didn't completely get what was happening in there, although I did understand it was…
Faisal Karim
  • 885
  • 1
  • 7
  • 16
17
votes
2 answers

How to use webp image format in HTML

I know this is a new format for images, but I don't know how to show it in HTML. Does anyone know how I can do that? Which browsers can show this image format besides chrome? sample-webp-image.webp
ttrasn
  • 4,322
  • 4
  • 26
  • 43
1
2 3
50 51