klikrzys Posted September 26, 2019 Share 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(); Link to comment Share on other sites More sharing options...
klikrzys Posted September 26, 2019 Author Share 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 ? Link to comment Share on other sites More sharing options...
matjazp Posted September 26, 2019 Share Posted September 26, 2019 What's your PW version? 1 Link to comment Share on other sites More sharing options...
klikrzys Posted September 26, 2019 Author Share Posted September 26, 2019 (edited) It's 3.0.123 Edited September 26, 2019 by klikrzys Link to comment Share on other sites More sharing options...
matjazp Posted September 26, 2019 Share Posted September 26, 2019 webp support is added in PW 3.0.132 4 Link to comment Share on other sites More sharing options...
klikrzys Posted September 28, 2019 Author Share Posted September 28, 2019 Thanks! It solved the problem! :3 Link to comment Share on other sites More sharing options...
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