[Support request] The theme is not generating any thumbnails

Home Forums Support The theme is not generating any thumbnails

Viewing 15 posts - 1 through 15 (of 26 total)
  • Author
    Posts
  • #1155656
    Shrawan

    Hello team,

    On my site, the homepage thumbnails for the posts as well as the thumbnails when I generate a gallery are all full size images that are just resized and displayed. None of the images appear to be cropped versions and the loading times are hugely affected by this.

    I had opened a similar ticket before and the issue was temporarily resolved when I used the Code Snippets plugin and added this code –

    add_filter( ‘generate_page_header_default_size’, function( $size ) {
    if ( ! is_single() ) {
    return ‘medium’;
    }

    return $size;
    } );

    But now even with the code activated all homepage featured images are just full res images and you can also see the same issue with the 1280 px images which are just shrunk and displayed in gallery. 2 example URLS attached.

    #1155782
    David
    Staff
    Customer Support

    Hi there,

    Looking at your sites home page first.
    I can see all the src-set images in the HTML and on a GT Metrix test it is requesting the 768px image.

    To make it request a smaller image you can change the width of the Archive Featured image in Customizer > Layout > Blog –> Featured images. Setting it to 300px should work.

    The single post looks fine – no issues reported aside from the Related Post thumbnails in the sidebar which are 50px and are using the 150px thumbnails size.

    #1157241
    Shrawan

    Hi David,

    The thumbnails in the single post (viewing on a Mac) appear to be just reduced versions of the full size images and not the generated 150 px resolution images (As you see on the sidebar). Is it possible that when we display thumbnails inside the post, we can request 150 px images which when clicked leads to the full size image?

    #1157575
    David
    Staff
    Customer Support

    Hmmm – maybe a plugin such as the lazyloader is interfering with the thumbnail creation as this is a WP thing not GP.

    OK – so in Customizer > Layout > Blog –> Featured Images > Post you could set the width to 150px.
    Add this PHP snippet to the site to create a link to the Large URL:

    add_filter( 'generate_single_featured_image_html', 'custom_add_post_thumbnail_link',25,1 );
    function custom_add_post_thumbnail_link($image_html) {
        if( $image_html == '' ) {
            $image_html = $image_html;
        } else {
            $large_image_url = wp_get_attachment_image_src( get_post_thumbnail_id(), 'large');
            $linked_html = '<a href="' . $large_image_url[0] . '">' . $image_html . '</a>';
        }
        return $linked_html;
    }

    A lightbox plugin could be used to open the image whilst remaining in the single post..

    #1367601
    Shrawan

    Hello team,

    I checked my website on the W3 validator and I see a bunch of errors mainly on ‘sizes’ ‘align’ and ‘type’ attribute. I’ve pasted the link to W3 validator in my first reply (in the box where the URL is hidden). Could you please take a look and let me know your feedback on this?

    #1367648
    David
    Staff
    Customer Support

    Hi there,

    the type attribute warnings are a requirement of WP coding standards. They can be ignored.

    You’re lazy loader is inserting placeholders for your images, which is why those errors are being displayed. That site does not fire the JS required to swap the images as it would do on load. This also can be ignored.

    #1368809
    Shrawan

    Hi David,

    Just another quick question on this – On my Google Pagespeed report, I came across one ‘ Largest Contentful Paint element – 1 element found ‘.

    I’ve added the Pagespeed URL in my first reply (in the box where the URL is hidden), would you please take a look and tell me what is causing this?

    Thanks

    #1369340
    David
    Staff
    Customer Support

    LCP elements get reported when a site loads in stages.
    They are the largest elements in pixels.
    That information is to help users ascertain and issues with your LCP times.

    In the case of that website you have a long LCP time because that image is being lazy loaded. Exclude above the fold images from lazy loading to reduce LCP time.

    #1369399
    Shrawan

    Hey David, I am using Sitegound’s default Optimizer Plugin for lazy load and there is no specific option for enabling or disabling above the frame lazy load. However I do have a small box into which I can add a CSS class – https://imgur.com/a/kl5nArA

    How can i disable above the fold images with this plugin?

    #1369436
    David
    Staff
    Customer Support
    #1369441
    Shrawan

    Hi David, added your code using the Code Snippets plugin (and activated it to Run on the front-end), but there is no change in the google pagespeed report.

    Could you please check my screenshot above? Should I replace ‘no-lazy’ in your code with ‘skip-lazy’ for this to work on my site?

    #1369442
    David
    Staff
    Customer Support

    Is the code still added to your site ?
    If so can you disable SG Optimizer so i can take a look.

    #1369448
    Shrawan

    Hi David, added your code using the Code Snippets plugin (and activated it to Run on the front-end), but there is no change in the google pagespeed report.

    Could you please check my screenshot above?

    Should I replace ‘no-lazy’ in your code with ‘skip-lazy’ for this to work on my site?

    Or should I just add your code and include the term ‘no-lazy’ to the field under ‘Exclude from Lazy Load ‘ in the SG Optimizer plugin setting?

    #1369473
    David
    Staff
    Customer Support

    Can you set the code to Run Everywhere.

    Should I replace ‘no-lazy’ in your code with ‘skip-lazy’ for this to work on my site?

    You can use whatever class as long as its included in ‘Exclude from Lazy Load ‘ field.

    #1369512
    Shrawan

    Tried both, but to no effect, it still shows the same thing.

Viewing 15 posts - 1 through 15 (of 26 total)
  • You must be logged in to reply to this topic.