Hey!
I am trying to control the animation of a .webp image.
For example I want to play the video only when I hover over the image and stop when the mouse is outside of it’s area.
Is this possible with .webp images, or I should convert it in another format?
here is a webp moving image: https://mathiasbynens.be/demo/animated-webp
I’m confused. This has nothing to do with controlling a webp image. It’s controlling a video element.
If you want to do this, you’ll need to look at using Javascript, and it’s irrelevant what format the image is.
How do you propose this will work on touchscreen devices?
Ok, just for the desktop… i suppose this is the way, to convert the webp image to a mp4 maybe?
Yes I will need javascript for sure.
I was thinking if there is a way to make it instantly from webp format or it will be better to convert it to some other format.
Ah, so the webp image is your video? If you want to be able to control it, then yes it would need to be a video (mp4, ogv or whatever) and not an image.
1 Like
Ok thank you very much! this is what I will do
Hi there nikostzounakos,
it is possible to extract the 12 frames that the animated webp file contains.
Doing so can then enable a method that will achieve your desired effect.
Check it out here…
nikostzounakos.zip (52.4 KB)
Further reading
webp to png conversion
…will give the 12 images that make up the animated webp file in png format.
Here is the actual folder…
animated-webp-supported-1,animated-webp-supported-2,animated-webp-supported-3.zip (47.6 KB)
png to webp conversion
…will then convert one of the the 12 png’s back to a webp.
coothead
2 Likes
Thank you very much coothead, this seems very good!
I will check it this way too
system
Closed
July 10, 2021, 5:14am
8
This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.