• My wordpress images are set as follows under WPAdminDashboard>Settings>Media>
    Thumbnail: 287×191
    Medium Size: 730×487
    Large Size: 1024

    In all of my recipes posts I have sized the “featured images” properly sized to 730×487 so that there is no CSS/HTML resizing that needs to be done when loading the page…making the site load faster.

    However on the homepage instead of the 287×191 properly sized thumbnail images showing for 9 total recipes…instead the 730×487 images are being loaded…causing them to need to be sized down to 287×191 with CSS/HTML. This seems uneccessary given that the properly sized thumbnail images already exist. It also make the site load slower and use more bandwidth.

    I have set the thumbnails and “regenerated” all thumbnails with a plugin to make sure they all exist at 287×191….but again they aren’t being loaded.

    Why is my theme (Lucid-Themes.com Cuisine) not showing the thumbnails next to the 9 featured recipes. (its loading the 730×487 and sizing down to 287×191). Why doesn’t it just serve the thumbnail images save time?

    How can I fix that?

    *****************EDIT*************
    After some digging it would appear my theme does not utilize the SRCSET attribute to make sure the thumbnail image sizes load on the homepage. Instead its just loading the 730×487 medium size and using CSS/HTML to size it down.

    what exactly is responsible for inserting the srcset attribute into the tag?

    Is there a way I can tackle this myself to make sure my thumbnail images load vs the medium size images?

    • This topic was modified 4 years, 4 months ago by titanwp.
    • This topic was modified 4 years, 4 months ago by titanwp.

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

Viewing 3 replies - 1 through 3 (of 3 total)
  • WordPress handles the adding of the srcset and sizes attributes for all images with the wp-image-xxx class (where xxx is the image ID it uses to look up the sizes). The attributes can be filtered by theme or plugins.
    If the theme is generating the content for the home page, then it likely isn’t putting the wp-image-xxx class on those images, so WP doesn’t add the attributes.

    Thread Starter titanwp

    (@titanwp)

    Is this something I can fix myself by adding/editing the code?

    I’d like to get the thumbnails to load on the page vs the full size images…its an incredible waste of bandwidth and slows down the homepage load time.

    Any help appreciated…

    You can make a child theme to change the way the home page is generated, and putting that class on the images is something WordPress does if the image is requested through the WP function. Or maybe just a filter to add the class in the home page situation. These are questions you should ask at the theme’s support forum, so the people familiar with the code can help (and hopefully fix it for everyone).

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Featured Image on Homepage/Thumnails’ is closed to new replies.