Skip to content

Conversation

@ellatrix
Copy link
Member

@ellatrix ellatrix commented Feb 6, 2018

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:

  • My code is tested.
  • My code follows the WordPress code style.
  • My code has proper inline documentation.

@ellatrix ellatrix added the [Feature] Media Anything that impacts the experience of managing media label Feb 6, 2018
@ellatrix ellatrix requested a review from a team February 6, 2018 20:14
<img
src={ url }
alt={ alt }
className={ id ? `wp-image-${ id }` : null }
Copy link
Member

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?

Copy link
Member Author

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.

@ellatrix ellatrix requested a review from a team February 7, 2018 00:12
@youknowriad
Copy link
Contributor

closes #4163 and #869

Copy link
Contributor

@youknowriad youknowriad left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍

@Adam-Collier
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

[Feature] Media Anything that impacts the experience of managing media

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants