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

Android Compose, How to play animated webp only once with coil?

I was successful show animated webp using coil on image composable. However, my goal is to only run this animated webp once. Now it is repeating infinitely. Is there a way? Is my code. animated webp class MainActivity : ComponentActivity() { val…
권오성
  • 31
  • 4
3
votes
2 answers

How to enable animated webp for the component in React Native with Expo EAS?

Animated gifs work in Android when using Expo EAS builds but animated webp (awebp) do not. Why? How do you get awebp working?
GollyJer
  • 23,857
  • 16
  • 106
  • 174
3
votes
0 answers

how to remove or reduce unused javascripts in React webpack?

Because of performance issues, I need to remove or reduce unused codes in build time. This is my unused bytes in coverage tab of developer tools. I need a tested, best practice way of solving this problem. I would greatly appreciate any help you…
Reza Ghorbani
  • 537
  • 4
  • 14
3
votes
1 answer

Chrome prefers jpg instead of Webp

I have a lot of image/webp images and want the browser to have a fallback image/jpg for Safari. For some reason Chrome (and every other browser) is still using the jpg image instead of the webp.
3
votes
1 answer

Error when converting images to animated webp file by PIL

Two ways I've tried: Save a list of PIL.Images as a webp file: from PIL import Image import os frames = [] fdir = "./frames" for f in sorted(os.listdir(fdir)): f = os.path.join(fdir, f) frames.append(Image.open(f)) frames =…
Flicic
  • 109
  • 8
3
votes
1 answer

Make Python http.server use correct content-type header for webp images

Trying to run a very simple local python webserver to serve a directory with some images in different formats like png, jpg and webp. python3 -m http.server -d /path/webdir 8090 Unfortunately, webp images are served with the wrong header:…
Janghou
  • 1,613
  • 1
  • 21
  • 30
3
votes
1 answer

Configure Nginx to serve WEBP images?

I am using ShortPixel to create WEBP images, with named image.webp and are saved in the same folder as image.jpg. I added this in etc/nginx/conf.d/webp.conf: map $http_accept $webp_suffix { default ""; "~*webp" ".webp"; } and added…
3
votes
1 answer

Possible to add imagick webp support for PHP in AWS Linux 2?

I'm running PHP 7.4 on an AWS Linux 2 instance. PHP 7.4 comes with imagick module 3.4.4 compiled by ImageMagick 6.9.10-6, but it doesn't have support for WEBP enabled. I've installed the libwebp-devel library, but I can't figure out how to recompile…
HWD
  • 1,547
  • 7
  • 36
  • 72
3
votes
2 answers

Downside from renaming WebP to JPG or other?

If I compress and save an image as WebP and then rename the extension as jpg will there be any downsides? This is why I ask: My blog doesn't support WebP format, however if I rename it to png or jpg it will accept it. What's the possible downsides…
ElKePoN
  • 822
  • 11
  • 21
3
votes
3 answers

How can I load webp images after these are generated by imagemin-webp-webpack-plugin?

I was configuring imagemin-webp-webpack-plugin to convert all my .png and .jpg images in my src/assets/images to dist/assets/images. When I ran my build command, the conversion was successful. All images had been converted to webp and distributed to…
Wilbert Caba
  • 530
  • 1
  • 6
  • 13
3
votes
1 answer

How to enable Webp support as true on php 7.4.10 version?

I'm working with php 7.4.10 version on Red Hat Linux 86_64 server and i would like to convert all images automatically to webp extension after user upload an image. I have php code that works fine to upload image, but when i try to upload an image i…
Michel Xavier
  • 133
  • 3
  • 14
3
votes
1 answer

How can I convert WebM file to WebP file with transparency?

I tried it with ffmpeg. ffmpeg input.webm output.webp input.webm contains transparent background and But the alpha channel becomes white in webp. I think that means alpha channel doesn't come together. I extracted frames with this command: ffmpeg…
c-an
  • 3,543
  • 5
  • 35
  • 82
3
votes
2 answers

PHP E_ERROR: gd-webp cannot allocate temporary buffer

I'm getting this PHP "E_ERROR: gd-webp cannot allocate temporary buffer" when trying to save a webp image from an URL. $image = imagecreatefromwebp('https://thumbs.gfycat.com/JointUnnaturalEnglishsetter.webp'); According to the PHP docs,…
Cat
  • 396
  • 1
  • 5
  • 13
3
votes
0 answers

Docker: How to enable .webp support for imagemagick in PHP correctly?

Within my Dockerfile I do the following: FROM urre/wordpress-nginx-docker-compose-image # ... various other things ... RUN apt-get update \ && apt-get -y --no-install-recommends install \ webp \ imagemagick \ …
Blackbam
  • 17,496
  • 26
  • 97
  • 150
3
votes
2 answers

CSS background-image fallback

Is there any way to specify a fallback image for a background image using CSS? Example .container { background-image: url(pics/img.webp); background-image-fallback: url(pics/img.png); }