From 819656a968e5006e4e1e7cfa33d548742f6daa8d Mon Sep 17 00:00:00 2001 From: Adam Wood <1017872+adamwoodnz@users.noreply.github.com> Date: Tue, 3 Sep 2024 17:01:32 +1200 Subject: [PATCH] Theme: Adjust card grid image sizes Better match the sizes to the grid breakpoints See https://github.com/WordPress/Learn/issues/2679 --- wp-content/themes/pub/wporg-learn-2024/functions.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wp-content/themes/pub/wporg-learn-2024/functions.php b/wp-content/themes/pub/wporg-learn-2024/functions.php index 4b1c85610..94bc8180e 100644 --- a/wp-content/themes/pub/wporg-learn-2024/functions.php +++ b/wp-content/themes/pub/wporg-learn-2024/functions.php @@ -174,7 +174,7 @@ function eager_load_first_card_rows_images( $attr, $attachment, $size ) { */ function modify_grid_image_sizes( $sizes, $size, $image_src, $image_meta, $attachment_id ) { if ( is_front_page() || is_archive() || is_search() || is_page( 'my-courses' ) ) { - return '(max-width: 768px) 100vw, (max-width: 1270px) 50vw, 33vw'; + return '(max-width: 750px) 100vw, (max-width: 1270px) 50vw, (max-width: 1320px) 33vw, 350px'; } return $sizes;