Skip to content
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

Responsive Images on Colleges Grid #174

Open
jmbarne3 opened this issue Jun 28, 2019 · 0 comments
Open

Responsive Images on Colleges Grid #174

jmbarne3 opened this issue Jun 28, 2019 · 0 comments
Assignees
Milestone

Comments

@jmbarne3
Copy link
Contributor

Description
Update the colleges grid to use wp_get_attachment_image and configure the function to appropriately spit out the correct classes.

Why it's Important
This will allow the built-in responsive image functions run on the images, adding srcsets and sizes attributes to the images.

Alternatives
Calling the wp_make_content_images_responsive function directly won't really work here as it only works if the wp-image-<attachment_id> class is present in the image class attribute.

Possible Implementation

  1. Update the ACF field to return attachment id instead of the URL.
  2. Update the markup to echo wp_get_attachment_image adding the necessary classes via the $attr argument.
@cjg89 cjg89 added this to the backlog milestone Jul 17, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants