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

Filter the attachment image attributes for the Twenty Seventeen theme. #1321

Merged
merged 2 commits into from
Aug 7, 2018

Commits on Aug 6, 2018

  1. 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>.
    Tonya Mork committed Aug 6, 2018
    Configuration menu
    Copy the full SHA
    6baffaa View commit details
    Browse the repository at this point in the history

Commits on Aug 7, 2018

  1. Allow default layout attribute for attachment pages.

    Tonya Mork committed Aug 7, 2018
    Configuration menu
    Copy the full SHA
    74dc97a View commit details
    Browse the repository at this point in the history