Skip to content

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

@zizther

Description

@zizther

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions