klikrzys Posted September 26, 2019 Posted September 26, 2019 Hello processwire world! Im having a little problem with getting my image in WEBP format. $image = $pages->get('/')->images->first(); echo $image->webp()->url();
klikrzys Posted September 26, 2019 Author Posted September 26, 2019 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 ?
klikrzys Posted September 26, 2019 Author Posted September 26, 2019 (edited) It's 3.0.123 Edited September 26, 2019 by klikrzys
klikrzys Posted September 28, 2019 Author Posted September 28, 2019 Thanks! It solved the problem! :3
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now