felixhaeberle / kirby3-webp

πŸš€πŸ”₯ Kirby 3 CMS plugin for converting JPG, JPEG and PNG into much smaller WEBP – speed up your website!
MIT License
39 stars 7 forks source link

"Class 'WebP\Convert' not found" error after uploading images #1

Closed dviate closed 4 years ago

dviate commented 4 years ago

Whenever I upload a file (see simple screencast in gif below), I keep receiving the "Class 'WebP\Convert' not found" error. The files I try to upload are uploaded in their original extension but not converted to .webp.

Hashtag #fail

My installation went like this:

  1. Downloaded zip-file from the master
  2. Unzipped file to development/clients/clientname/httpdocs/site/plugins/kirby3-webp/
  3. Copy/pasted stuff from the .htaccess sample to my .htaccess-file
  4. Added the extra lines to config.php

But, whenever I look at the composer.json-file on line 6, I see "rosell-dk/webp-convert": "^2.3" which I didn't see in my installation list as mentioned above.

Did I do something wrong, or is the readme incomplete? πŸ€”

felixhaeberle commented 4 years ago

Hey, thanks for reaching out, I think there is a bug in the Class Loading with missing dependencies. Will look into it tomorrow. πŸ‘‹

dviate commented 4 years ago

Did you find a solution, @felixhaeberle? :)

felixhaeberle commented 4 years ago

Hey, sorry for not replying, fix is in the works. πŸ‘ Will push tomorrow πŸ™

felixhaeberle commented 4 years ago

@dviate I push a fix to it this evening! 🀟

felixhaeberle commented 4 years ago

@dviate Can you try again? I just pushed a new fix to the main branch. Sometimes, if the pictures are really big (multiple MB's) the converting process takes naturally longer, but does complete for sure. The .webp gets generated, but not selected, because if the client can accept .webp, the .webp is sent to the client instead of the .png or *.jpg. Because of the Apache/nginx configuration.

jensschnitzler commented 4 years ago

Hello everyone and thank you for this plugin!

I just installed the latest version of the plugin and I think I might be experiencing a related issue:

timothyachumba commented 4 years ago

I seem to be facing the same issue as @jensschnitzler.

felixhaeberle commented 4 years ago

Will look into it! Can you possibly attach the uploaded placeholder.png here?

jensschnitzler commented 4 years ago

Thank you! Sure, it's just a random image i have on my desktop and regularly use for testing:

placeholder

chrtz commented 4 years ago

@felixhaeberle FYI, I'm facing the same issue @jensschnitzler, too.

felixhaeberle commented 4 years ago

@chrtz Okay, looking into it today! Also, I kindly appreciate any pull request or contribution. :)

chrtz commented 4 years ago

@felixhaeberle sure, I'd like to help. But I might not be experienced enough.

I noticed, that I also just downloaded the zip, as @dviate did, too. @jensschnitzler did you also just downloaded the zip, or did you install the plug-in via composer/git submodule?

Jonatanceja commented 4 years ago

@felixhaeberle sure, I'd like to help. But I might not be experienced enough.

I noticed, that I also just downloaded the zip, as @dviate did, too. @jensschnitzler did you also just downloaded the zip, or did you install the plug-in via composer/git submodule?

Have the same issue, i just installed trough git submodule and composer. Both ways and have the same error.

jensschnitzler commented 4 years ago

@chrtz i downloaded the zip :-)

dviate commented 4 years ago

Sorry for the delay, I was offline for a few weeks ⛺️

I just followed the steps for the manual installation and I see the same error message as @chrtz and @jensschnitzler.

By the way, when I run $ composer require felixhaeberle/kirby3-webp I'm receiving the following error. I'm afraid that's caused by the fact that you didn't tag this repo yet.

[InvalidArgumentException] Could not find a version of package felixhaeberle/kirby3-webp matching your minimum-stability (stable). Require it with an explicit version constraint allowing its desired stability.

felixhaeberle commented 4 years ago

Good news, this weekend I'll have some time to work on this issue :) Thanks for the feedback and the bug descriptions! πŸ‘

rcvd commented 4 years ago

Good news, this weekend I'll have some time to work on this issue :) Thanks for the feedback and the bug descriptions! πŸ‘

Any news on this?

casderooij commented 4 years ago

Hello everybody! This issue appears to be caused by the use of listed pages. I committed a pull request πŸ™‚

felixhaeberle commented 4 years ago

@all Did the change fix your problem?

rcvd commented 4 years ago

@felixhaeberle it works for me, thank you.

dviate commented 4 years ago

@casderooij, great job! For me it works like a charm now. Can you tag this version for those who play around with Composer, @felixhaeberle? πŸ™πŸ½

felixhaeberle commented 4 years ago

I'll tag this version soon! Closing this by now.