Gallery image size : gtmetrix not happy
-
Hi,
i setup the gallery to be full width 2 rows of 5 images each they display nice but after testing on gtmetrix it complained about resized image ; the fact is that they are all resized from 480px × 300px (to 380px × 238px), it means more kb to download for nothing.
I know it depends on how much photos you like in a row (full width or not) it’s not very effective to declare so many add_image_size in functions.php.
I ended up with added this to my functions.phpfunction wpdocs_remove_then_add_image_sizes() { remove_image_size( 'onepress-small' ); add_image_size( 'onepress-small', 380, 238, true ); } add_action('init', 'wpdocs_remove_then_add_image_sizes');
Any thoughts ?
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘Gallery image size : gtmetrix not happy’ is closed to new replies.