-
Notifications
You must be signed in to change notification settings - Fork 799
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
Refactor block attributes #15781
Refactor block attributes #15781
Conversation
Thank you for the great PR description! When this PR is ready for review, please apply the Scheduled Jetpack release: June 2, 2020. |
Caution: This PR has changes that must be merged to WordPress.com |
1 similar comment
Caution: This PR has changes that must be merged to WordPress.com |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like this! Can we do the same for both images?
r207483-wpcom |
Switches the AMP usage to the new image object introduced in #15781 and adds the width/height that fixes an aspect ratio issue for AMP.
* [not verified] Add AMP support using amp-image-slider * [not verified] Add esc_attr() to escape attributes * [not verified] Remove source from attributes In order to help AMP and server-side rendering, removing the source will make them available to PHP side to output the proper AMP markup. * [not verified] Update extensions/blocks/image-compare/image-compare.php Co-authored-by: Jeremy Herve <jeremy@jeremy.hu> * Use new image object attribute Switches the AMP usage to the new image object introduced in #15781 and adds the width/height that fixes an aspect ratio issue for AMP. Co-authored-by: Jeremy Herve <jeremy@jeremy.hu>
Due to changes for AMP support in #15753 we are changing the attributes to not be pulled from source. This allows switching the images to objects and simplifies the code.
Additionally, adds width/height attributes and uses the
photonizeImageProps
utility to set a photon URL.Fixes: #15741
Changes proposed in this Pull Request:
Testing instructions:
Note: after this change goes in, the AMP part will need to be updated to include width/height that will also fix the aspect ratio issue.
Proposed changelog entry for your changes: