php gd how to check for webp animation? and how (with what) to resize (IF resize is needed) webp with animation preservation?

How to check for webp animation ?, and how to resize (IF resize is needed) webp with animation saving.
Let me explain a bit about "if resize is needed": This means that if the width or height of the picture (any picture!) Is less than the size in which all pictures are resized, then the picture will not be resized.
Why? That because after resizing it will be larger than the original. This is against the common sense of resizing.
I'm fine with gif. But with webp, that also with animated ... ???
linked Animated not working when i convert Gif to webp in PHP but vice versa
Share solution ↓
Additional Information:
Link To Answer People are also looking for solutions of the problem: apache/2.4.52 (win64) openssl/1.1.1m php/8.1.2 server at localhost port 80
Didn't find the answer?
Our community is visited by hundreds of web development professionals every day. Ask your question and get a quick answer for free.
Similar questions
Find the answer in similar questions on our website.
Write quick answer
Do you know the answer to this question? Write a quick response to it. With your help, we will make our community stronger.