Update hooks priority for wp_generate_attachment_metadata
#271
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
wp_generate_attachment_metadata
to work with azure storageclassifai_generate_image_alt_tags_source_url
filter to helper functionget_modified_image_source_url
where rescanning is done local fileDescription of the Change
ClassifAI is generating tags on
10
priority, while the storage plugin uploads image to storage blob and deletes locally on priority9
, by the time it is getting there to generate tags, the local image is gone and alt text is not generated, reducing priority of the hook will allow it to generate the text and then upload to storage.I found a related PR Fixes azure storage compatibility issue with classifai. #250 where the hook priority was increased due to similar issues, setting hook priority to be in following order
smart_crop
at7
andalt_text
at8
should hopefully fix issues both issues.The above changes only fix issue when the image is being uploaded, it doesn't work when we try to generate/re-generate/rescan image tags from media modal for an existing image, adding the filter introduced in Allow filtering of the image URL prior to generating image tags and alternate text #217 it other places will help with the same.
Verification Process
Checklist:
Applicable Issues