Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Filter the attachment image attributes for the Twenty Seventeen attac…
…hment page. Per issue #1237, the Twenty Seventeen theme is adding `$attr['sizes'] = '100vw';` which stretches images on the attachment page when in AMP mode. This commit filters 'wp_get_attachment_image_attributes' to change the layout to responsive and sizes to the image sizes per `wp_get_attachment_image_sizes()`. AMP uses these attributes to render the <amp-img>.
- Loading branch information