When checking Google Pagespeed insights for my site I keep seeing reports that certain images are not optimised. On closer examination it seems that the offending images are being displayed in for Block 18 elemnts in a sidebar. It seems that in that situation, the image is displayed a4 324×179 pixels, but no such thumbnail size exists and the theme is serving images at 695×385 pixels, hence the complaint from Pagespeed Insights. I generated the correct size thumbnail, but the theme doesn’t use it.
Any suggestions?
I’m fully aware of how to regenerate thumbnails, but that is if little use when the required thumbnail size isn’t called for by the theme. All of my thumbnails are present and correct, but in this instance the theme isn’t calling for an appropriate one.
A 324×160 thumbnail exists but it’s serving one at 695×385.
Hello,
As you can see the block 18 module from the sidebar is indeed calling the 696 pixels thumb from the code: http://screencast.com/t/mUjV66aahP
This was a decision made by our development team for better positioning. If you want to make it grab a different thumb you can use the theme api to change the thumb used on this element: https://forum.tagdiv.com/api-thumbnail-introduction/
Thank you!
Thanks. I can see it’s easy to create a new thumbnail size, but how to attach it to a particular block in a particular location isn’t so obvious.
Do I have to supply a new module template for module mx8 just to specify a thumbnail that fits?
Hi,
You just need to change the thumb size in the module file: http://screencast.com/t/mUjV66aahP
Change it to the thumb size you want if the thumb is already defined or change it to your newly defined thumb.
You will have to regenerate thumbs after you edit thumbnails
Thanks
OK I’ll just have to re-apply the fix after every theme update then. Is that the only place module mx8 is used or does it ever get rendered at a different size?
Hi,
There is a list in the theme panel that shows where each module is being used. In the case of module mx8 it is used only on block 18 so your change will not affect any other block. You will find this list here: http://screencast.com/t/y3t0atLB9a
As for the updates, the mokdules can be altered from the child theme as this guide suggests: https://forum.tagdiv.com/the-child-theme-support-tutorial/ It will spare you a few updates if the file does not get modified.
Thank you!
Great stuff. Thanks! Pagespeed has stopped moaning about the images now.
Which actually raises another question. Is there any way to obtain the unadulterated CSS files for the theme so that I can split out the critical, above the fold stuff and defer the rest? I have had some luck reverse-engineering it and managed to get the pagespeed score up from 70/100 to just over 90, but with a couple of minor glitches. removing the render-blocking CSS makes an astonishing difference.
Hi,
I think you mean the unaltered css maybe…well you can get that from the main theme package and see the main folder of the theme and check style.css.
If you are on a quest for page speed, you might give this topic a shot:
https://forum.tagdiv.com/topic/score-100100-pagespeed-with-newspaper-wordpress-theme/
Thanks.
I got the child theme working, but it appears not to work for the mobile theme. Is this correct or could I be doing something wrong?
Hi,
The mobile theme has not been tested with the child theme support.
The mobile theme files can be found here: http://screencast.com/t/ZD1204Md6
Thank you!
