-
Notifications
You must be signed in to change notification settings - Fork 4
Open
Description
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
- Update the ACF field to return attachment id instead of the URL.
- Update the markup to echo
wp_get_attachment_imageadding the necessary classes via the$attrargument.