Okay
  Public Ticket #221985
Blog overview thumbnail images loading full size
Closed

Comments

  • Bjorn started the conversation

    Hi guys,

    I'm a bit confused over image sizing with the Salient theme. I've noticed recently that my blog page is getting quite heavy to load, dividing it in sub pages helped a bit.
    It seems that the thumbnail images in the blog overview page are actually the full sized images that are loaded, and not the custom sized thumbs that are generated.
    My WP thumb settings are 150x150, 300x1000 and 960x2000. I'm using only the force regenerate thumb plugin, no other image related plugins.
    Are there any settings in Salient concerning image load and thumbs ?
    Thanks !

  •  1,089
    ThemeNectar replied

    Hey Bjorn!

    It's true that the masonry version of the blog should use smaller sizes - this was overlooked as all blog formats are currently using the same size. I've noted to sort this for the next release, for the time being if you don't feel like messing with the code at all just continue using the pagination or infinite scroll :)

    Cheers

  • Bjorn replied

    Hi there,


    Sorry to get this old topic out of the archive, but the issue with the masonry thumbnails for the blog overview is still not solved. I\'m using pagination, but would like to get this sorted as well.

    Is there a way to serve smaller sized images for the overview page, now they are full size.. I\'m using different image size for my featured image, so 1 size for all doesn\'t work for me.
    Thanks !

  •  1,089
    ThemeNectar replied

    Hey,

    Right now you could handle this through a child theme but the reason I didn\'t add it in as a standard feature after all because there was an issue with forcing a fixed size (aspect ratio) rather than letting the height of the image be automatic for users who needed varying sizes

    Cheers

  • Bjorn replied

    Hi there,

    Thanks for your reply. How can I apply this into my child theme ? Could you provide me with the code for this ?

    Many thanks..

  •  1,089
    ThemeNectar replied

    Hey - find this section within the entry.php and entry-image.php files inside the includes/post-template directory:

    echo \'\'.get_the_post_thumbnail($post->ID, \'full\', array(\'title\' => \'\')) .\'\';
    
    and change it to:
    echo \'\'.get_the_post_thumbnail($post->ID, array(500,200), array(\'title\' => \'\')) .\'\';
    
    
  • Bjorn replied

    Hi there,


    I have changed both files, but still the large images are loaded for the blog overview page, instead of the smaller medium sized ones. I\'m using the masonry style page.
    In my WP media settings I have defined thumbnails as 150x150, medium 400x.. and large 960x...

    Any ideas ? https://compagnie-m.com/blog

  •  8,993
    Tahir replied

    Hey,

    See screenshot :


    I am still seeing the large attachment being output which means that you have not change the php code in the appropriate entry php template.

    Thanks


    ThemeNectar Support Team 

  •   Bjorn replied privately
  •  8,993
    Tahir replied

    Hey Again,

    You have a cache plugin active therefore the FTP changes arent taking effect. Please refresh the cache or turn it off while testing.

    Thanks


    ThemeNectar Support Team 

  • Bjorn replied

    Hi there,

    Sorry for taking this from the archive. I have verified my site again, and the problem with the loading of large images still exists. My caching is currently disabled.

    So the thumbnail images for a featured post img ar not loaded in the thumbnail size, but full version. Which gives the site a terrible speed ranking of course.

    I have adjusted the code in entry.php and entry-image.php as requested. I\'m using the Colorbox plugin for images, I have disabled this and the result is still the same.

    Theme is updated to version 6.1.5

    Could you please have a look ?

    Thanks ! Bjorn


  •  8,993
    Tahir replied

    Hey ,

    Try using this: https://wordpress.org/plugins/ewww-image-optimizer/ . If still it doesnt work you might need a CDN Service.

    Thanks


    ThemeNectar Support Team 

  • Bjorn replied

    Hi Tahir,

    I\'m not really following you here. I\'ll have a look to the image-optimizer plugin but the images used on my site have been optimised already, CDN will improve the loading times on the images but that\'s not the issue here.

    The problem is that the theme is loading the full size images in the overview page, and not the thumbnails or smaller sized images. So in a paginated blog I\'m loading 10x the full res version of an image, which is 1200x960px or similar, instead of 300x100px. There should be a way to fix this ? I noticed on your demo blog this is the same as on my site.

    Could you have a lok and see if there\'s a way to load smaller images ?

    Thx !

  •  8,993
    Tahir replied

    Hey Again,

    I just logged in via FTP and any changes to the php files are not applying on the frontend. Have you tried to reach out to your host to see if any server side caching is enabled? If they say no try repairing your database by following this:


    http://www.maketecheasier.com/fix-corrupted-wordpress-database-2/

    Thanks


    ThemeNectar Support Team 

  • Bjorn replied

    Hi Tahir,

    I have contacted my host and they say no server side caching is enabled. How can I check this for myself ? Is there a way to see how these 2 php files are being loaded ?

    Bjorn

  • Bjorn replied

    I have checked the database via the link you send me and there were no problems... I have re-checked my cache plugin but can\'t find anything that would prevent the files from being loaded..


  • JB replied

    Hi there,

    first of all sorry for my english, I\'m french.

    So, I had exactly the same problem as you Bjorn, I tried all the tips provided by Tahir or the other admins, but anyway, as you, nothing worked.

    So I spend an entire day trying to understand how it works, then I\'ve figure a way. Maybe it\'s not a \"clean way\" but it works for me as you can see : http://mg-ctzn.net/experiment/ all the images are now loaded with the right size, not full, and it\'s soooooo light ^^

    Two steps :

    1) You need to select a Featured Image for each of your Posts... In my case it was fast, just 21 Posts to modify. But maybe it\'s not possible for you if you have too many... In that case it will not working. But if you can do it, go step 2.

    2) You need to modify some code in the file : entry.php , just this one. Attached a screenshot, you can see what modifications I did.

    The function get_the_post_thumbnail (line76) will load the Featured Image we\'ve selected for each Post previously. Just change the size \'large\' to \'medium\' or an other.

    Then desactivate the line where the_content is called. This means we can\'t have any video or other content from the post anymore, displayed here, on this blog overview.

    Now, we have the Featured Image displayed (with an optimised size!), and the title. It\'s not the same order : Title on top and Image on bottom but it\'s easy to change when you\'ve understand the idea ;)

    I hope this will help you, maybe if anyone have others ways to do it ? I\'m listening !! I\'m a designer, not a developer :p

    cheers

  • Bjorn replied

    Hi JB, many thanks for getting back on this thread. I will have a look at your solution and let you know if it works !

    Cheers !

  • rohitr55 replied

    Hello all,

    Is there anybody found a right solution for this issue?

    I am a photographer and I use the image gallery as the main feature to showcase my image. Because the thumbnails are loading the full size image it is taking really long time to load the whole page and the size of the page is really big.

    Please could anyone guide me how to change the thumbnails to smaller size when the gallery is loaded.

    ThanksĀ