- This topic has 70 replies, 3 voices, and was last updated 4 years, 8 months ago by
David.
-
AuthorPosts
-
September 3, 2021 at 5:19 am #1917607
David
StaffCustomer SupportCan’t see it on the Google PSI report, but your site is preloading the image eg. example from on of your posts:
<link rel="preload" as="image" href="https://xxxxxxxxxxxxx/wp-content/uploads/2021/08/Rename_AzureVM_PowerShell_01.jpg">Do you still have the code here ? As that was added for when you had the Header Element.
September 3, 2021 at 5:52 am #1917636Charbel
Hello @David,
Yes, I still have the following code in my functions.php. Shall I remove it?
/** Remove the Featured Image Background from the header element **/ // https://generatepress.com/forums/topic/how-to-fix-largest-contentful-paint-element-for-page-hero/page/2/#post-1819584 add_action( 'wp_head', function() { if( is_single() ) { $featured_img_url = get_the_post_thumbnail_url(get_the_ID(),'medium_large'); echo '<link rel="preload" as="image" href="'.$featured_img_url.'"/>'; echo '<style>.page-hero { background-image: url('.$featured_img_url .');}</style>'; } },0);Thank You!
September 3, 2021 at 5:54 am #1917637David
StaffCustomer SupportYes, it will stop preloading the image as thats not required on Mobile now.
September 3, 2021 at 6:01 am #1917639Charbel
Thank you @David,
Please note that I have removed the code and cleared the cache.
Could you please check and confirm from your side?
Thank You!
September 3, 2021 at 7:01 am #1917674David
StaffCustomer SupportI can confirm its no longer making the image request on mobile 🙂
September 3, 2021 at 7:42 am #1917712Charbel
Many Thanks, @David much appreciated!
I have seen a bit of improvement so far. Let’s see in the next couple of days.
September 3, 2021 at 8:12 am #1917917David
StaffCustomer SupportYou’re welcome
September 25, 2021 at 4:04 am #1942335Charbel
Hello @David,
Hope you are doing well.
I have a small request for Mobile Menu, please.
I changed the Hamburger icon size (left-hand side) for Mobile using the following CSS code:.main-navigation .menu-toggle { font-size: 20px; }I would like to do the same for the Search icon on the right-hand side to increase its size a bit (from 16px to 20px), so they can be identical.
Could you please help?
Thank You!
September 25, 2021 at 10:42 am #1942772David
StaffCustomer SupportHi Charbel,
would you mind raising a new topic so the question is unrelated to this one
Will make it easier for you and us to track and respond 🙂September 25, 2021 at 10:45 pm #1942995Charbel
Sure, thank you @David!
September 26, 2021 at 3:52 am #1943100David
StaffCustomer SupportThanks!
-
AuthorPosts
- You must be logged in to reply to this topic.