-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Let WP make images responsive #4898
Conversation
<img | ||
src={ url } | ||
alt={ alt } | ||
className={ id ? `wp-image-${ id }` : null } |
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.
wouldn't this invalidate existing image blocks?
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.
Yes, somehow didn't expect missing attributes to error.
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.
LGTM 👍
Hey, does adding this class presume it is full width? Say you had something half the width of the viewport can we account for that too? My images seem bigger than they should be |
Description
Let WP make images responsive. WP looks at the class with ID for this.
How Has This Been Tested?
Upload an image, and view on the front-end. Verify it has
srcset
attributes etc.Checklist: