Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Convert single File via CLI #610

Open
JNBG opened this issue Aug 27, 2024 · 0 comments
Open

Convert single File via CLI #610

JNBG opened this issue Aug 27, 2024 · 0 comments

Comments

@JNBG
Copy link

JNBG commented Aug 27, 2024

Feature Request

For a current Project I am running a custom built data-importer for WordPress, which also can update Images. It does so by keeping an Image in the Database and just replacing the underlying File itself.
This now results in webps breaking this Flow as the Conversion Process is not being triggered again, as the Image itself per se still exists in the eyes of the Plugin, and as the URL has not changed there is no theoretical need for a new Conversion when requesting the Image in the Frontend.
ATM my go to Solution is just to delete the File from the /wp-content/webp-express/webp-images/uploads/... Folder and thus force the Plugin to regenerate the webp on Request.
I tried using the WebPConverter::convert Function but as the Custom Importer has to be CLI based I cannot access the Class as the other Plugins have not loaded yet.
One thing I could do is run the CLI Command to regenerate the Folder, but with a lot of Images this is a bit too slow.

So it would be awesome to have a Option to use the CLI webp-express convert and pass a single File as Location instead of an entire Directory.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant