Amazon web services – PHP GD enables webp image format

I have created an instance of Linux AWS EC2 and I have a Laravel application that runs successfully in PHP 7.2. One of the composer's packages converts images to the webp format, but has received this error:

Call to undefined function Gumlet\imagecreatefromwebp()

From what I understand, this is related to the image format that is not set in GD within PHP. I have confirmed that GD is installed and active and, from what I have read, the solution to this problem is:

./configure --with-vpx-dir=

But I don't know where this should run. I ran this at the root of my EC2 instance and got the error:

bash: ./configure: No such file or directory

Hoping someone can point me in the right direction.