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

Support for new assets to be handled immediately instead of queue #398

Open
zizther opened this issue Mar 27, 2024 · 0 comments
Open

Support for new assets to be handled immediately instead of queue #398

zizther opened this issue Mar 27, 2024 · 0 comments

Comments

@zizther
Copy link

zizther commented Mar 27, 2024

I am building a way for a user to update an asset and for the asset to be returned via AJAX. The response should return the ImageOptimize processed image.

The issue I am facing is that it seems the image is not being returned in time as it is being processed via the queue.

Describe the solution you would like

It would be good if there was a way ImageOptimze could check for a header or URL param you can pass along to the assets/save-image endpoint to make sure it's done immediately.

For reference here is the logic that chooses between doing it immediately, or doing it via a queue job
https://github.com/nystudio107/craft-imageoptimize/blob/develop-v4/src/fields/OptimizedImages.php#L216

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

No branches or pull requests

1 participant