diff --git a/src/wp-content/themes/twentyseventeen/functions.php b/src/wp-content/themes/twentyseventeen/functions.php
index 34cad0bbc3..7463adaffe 100644
a
|
b
|
add_filter( 'get_header_image_tag', 'twentyseventeen_header_image_tag', 10, 3 ); |
572 | 572 | * @return array The filtered attributes for the image markup. |
573 | 573 | */ |
574 | 574 | function twentyseventeen_post_thumbnail_sizes_attr( $attr, $attachment, $size ) { |
575 | | if ( is_archive() || is_search() || is_home() ) { |
576 | | $attr['sizes'] = '(max-width: 767px) 89vw, (max-width: 1000px) 54vw, (max-width: 1071px) 543px, 580px'; |
577 | | } else { |
578 | | $attr['sizes'] = '100vw'; |
579 | | } |
| 575 | |
| 576 | // Restrict resizing of images in admin section. |
| 577 | if ( ! is_admin() ) { |
| 578 | |
| 579 | if ( is_archive() || is_search() || is_home() ) { |
| 580 | $attr['sizes'] = '(max-width: 767px) 89vw, (max-width: 1000px) 54vw, (max-width: 1071px) 543px, 580px'; |
| 581 | } else { |
| 582 | $attr['sizes'] = '100vw'; |
| 583 | } |
| 584 | } // end: if is_admin condition |
580 | 585 | |
581 | 586 | return $attr; |
582 | 587 | } |