Jump to content

Problem with getting webp format URL


klikrzys
 Share

Recommended Posts

I dont know why i cant edit, my post (i send it in mistake). So once again:

Hello processwire world!

Im having a little problem with getting my image in WEBP format.

I in my config i have:

$config->imageSizerOptions('webpAdd'true); 
$config->contentTypes('webp''image/webp');

The code which fails

$image = $pages->get('/')->images->first();
echo $image->webp()->url(); // Fails: Error: Exception: Method Pageimage::webp does not exist or is not callable in this context
echo $image->url; // returns path correctly

 

I'd love to hear your opinion on that, im having really hard time with it ?

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...