• Prior to uploading to WP Media, I re-size all my large “hero” images to the size displayed by my Twenty Fourteen (child) theme: ie, 1024×568.

    My theme also displays 6 thumbnail images on the page that opens when my blog is accessed. These are 346×192, and I have set the thumbnails at that size in the Media part of my WP Settings.

    However, GTmetrix informs me that my thumbnail images are “resized in HTML or CSS from 1024×568 to 346×192”, which is increasing my site load time.

    How do I get my Twelve Fourteen (child) theme to load the thumbnails already scaled to 346×192, instead of loading a full-sized image first for thumbnails, then resizing to 346×192? Would be appreciative of some advice on this.

    Cheers
    Ross

    The page I need help with: [log in to see the link]

Viewing 4 replies - 1 through 4 (of 4 total)
  • Hello rossb,

    The GTMetrix is correct. All the images appearing on the front page is of larger size i.e. 1024X568.

    When you upload the featured image make sure you select the correct size.

    Or else you need to manage that programmatically.

    Check this reference link: https://www.wpbeginner.com/plugins/how-to-crop-and-edit-wordpress-post-thumbnails/

    Hope this helps.

    Thanks.

    Thread Starter RossB

    (@rossb)

    Thanks a lot for your response, Kartik.

    I do always change the featured image to the correct size – that is, 1024×568 – before I upload it to Media.

    I thought the theme should create a thumbnail automatically, scaled to the size I’ve set in Media in the Settings: that is, 346×192. Isn’t this how it’s supposed to work?

    Thanks for your link. I really didn’t think I should need to install a thumbnail resizing plugin, though. Surely, the theme should manage to create the correct-sized thumbnail without a plugin?

    As a last resort I’ll try the plugin – but I’d really like to understand why the theme isn’t functioning as it should re thumbnail re-sizing, and to fix whatever’s wrong. If you or someone else could explain what I need to do to remedy the situation within the theme itself, would be most grateful!

    Cheers
    Ross

    Hello Ross,

    Your assumption is correct. Theme/Wordpress automatically created the thumbnail of the desired size, but it is on user/admin to assign the correct size to Post.

    Normally, we manage that via Code that it automatically take the smaller size thumbnail, but if you are not that technical you can assign the correct size when you are selecting an image and setting it as featured image.

    Does this make sense? Feel free to ask if you have any further question.

    Thanks,
    Kartik

    Thread Starter RossB

    (@rossb)

    Thanks a lot for your clarification and patience, Kartik.

    What you’ve written does make sense to me, but my theme (Twenty Fourteen child theme) works in a way that is perhaps not usual. When a post is published, the image featured shows up in full size (1024×568) at the head of the post. I re-size the pic to those dimensions before uploading to Media and setting it as a “featured image.”

    The home page allows three such posts to be displayed, then the oldest of the three disappears from view once you publish a new post, UNLESS you enter the post edit section and tick another “Featured” box and save. If you do this, the image linking to the post appears as a thumbnail (346×192) in a gallery of 6 above the most recent three posts.

    Since the thumbnail images are already set as “featured” like this, I’m not sure how I’d go about following your directions regarding setting the thumbnail as a featured image.

    I think the best solution in this case would probably be, as you say, to “manage that via Code that it automatically take the smaller size thumbnail”. The problem is, I don’t know which code to write or where to put it. I am capable of cutting and pasting code recommendations to the appropriate theme file, but not of writing the code myself, or of determining which file it should go in. If writing this code is a quick and easy task for you, I would most certainly appreciate your recommendation – but if it’s any hassle, no worries. You’ve put enough time into helping me already.

    Cheers
    Ross

    • This reply was modified 5 years, 8 months ago by RossB. Reason: typo
Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Twenty Fourteen theme loading full-sized image as thumbnail, then re-sizing’ is closed to new replies.