Describe the bug
WordPress 6.3 adds a new fetchpriority attribute as well as aspect ratio controls in Image blocks. As of now, aspect ratio is controlled via inline css on the img tag itself, so it needs to be checked for when creating the picture tag.
Likewise, both the fetchpriority and decoding attributes need to be left on the img tag and not moved to the picture tag.
To Reproduce
Steps to reproduce the behavior:
- Install WP 6.3
- Set an aspect ratio on an image block in Gutenberg.
- Add a large image in Gutenberg to trigger the
fetchpriority attribute.
- Save post. View on front end, inspect the image block. You will see the aspect ratio doesn't work as it has been moved to the
picture tag. You will also see the other two attributes moved from the img to the picture tag.
Expected behavior
All 3 elements need to remain in the img tag.
Additional context
PR #738 created to fix.
Describe the bug
WordPress 6.3 adds a new
fetchpriorityattribute as well as aspect ratio controls in Image blocks. As of now, aspect ratio is controlled via inline css on theimgtag itself, so it needs to be checked for when creating the picture tag.Likewise, both the
fetchpriorityanddecodingattributes need to be left on theimgtag and not moved to thepicturetag.To Reproduce
Steps to reproduce the behavior:
fetchpriorityattribute.picturetag. You will also see the other two attributes moved from theimgto thepicturetag.Expected behavior
All 3 elements need to remain in the
imgtag.Additional context
PR #738 created to fix.