Bump priority in hook to make webp conversion works #231
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.
Description of the Change
this change closes #191
I was able to investigate this issue and enabling performance lab and enable webp option causes the plugin just uploads
webp
converted images from intermediate images excluding the original.Because of this plugin uses
wp_generate_attachment_metadata
hook to upload images to blob container, there seems to be a priority conflict with WordPress native conversion from the original image at the moment of uploading to the container.Increasing the hook priority to 10, make the plugin work as expected and upload the
webp
converted original image and also the original image itself which is the expected behavior (as referred by the official documentation).After uploading to the blob container and checked the meta data I'm able to see the original jpeg image is kept into the meta field
Also, the
windows_azure_storage_info
attachment meta field is keeping both imagesHow to test the Change
_wp_attachment_metadata
windows_azure_storage_info
_wp_attached_file
should point to the webp original versionChangelog Entry
Credits
@hugosolar, @ali-awwad (for reporting it)
Checklist: