title: how to make WebP image from existing image files in php
body: <p>I know there are packages in Laravel like <a href="https://github.com/buglinjo/laravel-webp" rel="nofollow noreferrer">this</a> for converting <code>PNG</code>/<code>JPG</code> images to <code>WebP</code> but this package is in php7.1 so we cannot use it for technical reasons, there is also an <code>imagewebp()</code> function in <a href="https://www.php.net/manual/en/function.imagewebp.php" rel="nofollow noreferrer">php</a> which we would like to use it, but I cannot find any documentation for how to read an already existing image and give it to the function to convert it to the WebP image. Does any one have a solution on  how to read an image file and give it convert it to the WebP images using the PHP extensions?</p>