I would like to add to this problem that there does not seem to be a save progress in terms of the bulk option. Whenever it finishes images it still indicates the same amount of images after scanning again.
Try to start it. Then put it on pause. Is there a green text saying “ok” next to the image path of the first image? You can hover the text to view details of how the conversion went.
Is that first image converted?
Note that the bulk conversion only really is needed when you cannot get the rules to work that triggers conversion, or the redirect rule needed for the “Varied image responses” mode. On standard LAMP setups, this stuff works.
Hi Rosel, thanks for the response. I figured out what was going wrong(in my case).
within the function getListRecursively()
I noticed when getting the $destination
with the function ConvertHelperIndependent()
that the variable $dir
had the following format /wp-content/./uploads/
so I used str_replace()
on $dir
to get rid of the dot $dir = strpos( $dir, '/wp-content/./uploads/' ) !== false ? str_replace( '/wp-content/./uploads/', '/wp-content/uploads/', $dir ) : $dir;
.
Would you have any clue why this was needed for me? The problem was really that the webp already exists check was being executed on the url with the dot and the actual destination where it is being placed is without the dot. And therefore the images never stop generating(atleast when using the bulk function).
-
This reply was modified 4 years, 8 months ago by
basvandijkk.
Ok, thanks for discovering the bug for me!
I’m puzzled about the exists check failing, because it is done like this in BulkConvert.php:
$webpExists = @file_exists($destination);
And the file_exists check should be able to handle the dot.
However, if you say canonicalizing fixes the problem, then I shall do that. I already have a function for that (PathHelper::canonicalize).
I have created a ticket here: https://github.com/rosell-dk/webp-express/issues/222
-
This reply was modified 4 years, 8 months ago by
rosell.dk.
You’re welcome! Thanks for making a ticket for it.
The same in my case. The bulk function is breaking down after a few hundred converts and when i start it again the plugin doesn’t recognize the converted images and tried to convert again…
When will an update be available?
Regards
Sorry, I don’t feel this issue alone is big enough to call for an update. Pushing a new update means that 10.000+ users will have to update the plugin. Probably only few of which are experiencing the issue.
I’m currently working on a major update of webp-convert – the library that WebP Express uses for converting to webp. This means that I don’t have anything worth pushing on WebP Express the next couple of weeks. An estimate could be ~ 3 weeks.
I do understand. What can i do to get the plugin working?
Regards