Navigation
This is archived content. Visit our new forum.

Tagged: 

  • Author
    Posts
  • #1178249
    mikechia
    Participant

    On this site I’ve noticed it loading the blog very slowly. It seems that the thumbnails for each post is loading the full size featured image, rather than one of the smaller WordPress variations.

    This is very slow to load the full size featured image everytime. For this reason, most themes and plugins use one of the wordpress image variations to speed things up.

    What can we do about this?

    #1178591
    Darshana
    Moderator

    Hi there,

    Thanks for writing in! I checked your site but I can see that your thumbnails are loading properly (https://snag.gy/qinxoY.jpg).

    Could you please provide us with a screenshot of your issue?

    Thanks!

    #1186171
    mikechia
    Participant

    Hi Darshana,

    Yes they are loading – but they load extremely slowly because they use the high-res photos in the thumbnails.

    The high-res photos are required for the featured image at the top of each post, but it seems crazy that the thumbnails load the high res photo each time. What we can we do to speed this up?

    #1186195
    Rue Nel
    Moderator

    Hello There,

    If you want to display not the full resolution in your blog index, since you already have your child theme active and ready, please insert this following code in your child theme’s functions.php file.

    // Get Featured Image URL
    // =============================================================================
    
    if ( ! function_exists( 'x_get_featured_image_url' ) ) :
      function x_get_featured_image_url( $size = 'full' ) {
    
        if ( ! is_singular() ) {
          $size = 'medium';
        }
    
        $featured_image     = wp_get_attachment_image_src( get_post_thumbnail_id(), $size );
        $featured_image_url = $featured_image[0];
    
        return $featured_image_url;
    
      }
    endif;

    Please let us know if this works out for you.

  • <script> jQuery(function($){ $("#no-reply-1178249 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>