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
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-imageendpoint 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