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

Only update variants for existing asset if the image has been manipulated #314

Merged
merged 1 commit into from
Feb 16, 2022

Conversation

friartuck6000
Copy link
Contributor

Description

Currently, when editing an existing asset, pressing Save triggers a call to OptimizeImages::updateOptimizedImageFieldData() inline with the browser request—even if the editor only updated the title or a field value, and didn't manipulate the existing image at all. For assets that are configured to yield a lot of variants, this can cause the request to hang for quite a while and become a productivity bottleneck for the editor.

This PR adds a check, to make sure an asset save was caused by an image manipulation, before firing the variant update process. It does this by checking that the current request is for the assets/save-image action fired by the AssetImageEditor.

@khalwat khalwat merged commit 123458c into nystudio107:develop Feb 16, 2022
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

Successfully merging this pull request may close these issues.

2 participants