Loading images below the fold? Impact on SEO
-
I got this from my developers. Does anyone know if this will be a SEO issue?
We hope to lazy-load images below the fold where possible, to increase render speed - are you aware of any potential issues with this approach from an SEO point of view?
-
Happy to help!
-
Thanks Tom!
As always, an amazing response.
Best
-
Hi Chris sorry for the late reply absolutely you can do this by using a plug-in cloudfare or PHP code
- https://wordpress.org/plugins/wp-deferred-javascripts/
- https://wordpress.org/plugins/defer-css-addon-for-bwp-minify/
Another plugin that does this solution but providing an administration area to configure it manually is Autoptimize, that allows to define a specific CSS code in a independent way of your theme CSS stylesheet
- http://www.oxhow.com/optimize-defer-javascript-wordpress/
- https://seo-hacker.com/optimizing-site-speed-asynchronous-deferred-javascript/
- http://www.laplacef.com/how-to-defer-parsing-javascript-in-wordpress/
The solution of these problem is removing those render-blocking scripts. But if you remove them, some plugins may not work properly. So, the best solution for the smooth rendering is:
1. Remove them from your website source page.
2. Use a single script, hosted by Google as the alternative.
3. Push down the new script at end of the page ( before “” tag).
Here is how to do it.
Copy the code from the following link and paste at your theme’s function.php file.
function optimize_jquery() { if (!is_admin()) { wp_deregister_script('jquery'); wp_deregister_script('jquery-migrate.min'); wp_deregister_script('comment-reply.min'); $protocol='http:'; if($_SERVER['HTTPS']=='on') { $protocol='https:'; } wp_register_script('jquery', $protocol.'//ajax.googleapis.com/ajax/libs/jquery/1.9.0/jquery.min.js', false, '3.6', true); wp_enqueue_script('jquery'); } } add_action('template_redirect', 'optimize_jquery');
Save the file and you are done! Now recheck the source of any page and you won’t see those two scripts at the head section. Alternatively, you can see the Google hosted JavaScriptscript source at the end of the page.
That’s all! Now the visible section of your page will be rendered smoothly.
Defer Loading JavaScript
Another suggestion from Google Page Speed tool is “Defer JavaScripts”. This problem happens when you use any inline JavaScripts like the scripts for Facebook like box or button, Google plus button, Twitter button etc. If you defer the JavaScript then the scripts are triggered after loading of the entire document.
How to defer JavaScript at WordPress
1. Create a JavaScript file and give the name as defer.js.
2. Place the JavaScripts codes that you want to defer into the defer.js file. For instance, if you want to defer Facebook like box script, paste the following at that file.
(function(d, s, id) { var js, fjs = d.getElementsByTagName(s)[0]; if (d.getElementById(id)) return; js = d.createElement(s); js.id = id; js.src = "//connect.facebook.net/en_GB/all.js#xfbml=1&appId=326473900710878"; fjs.parentNode.insertBefore(js, fjs); }(document, 'script', 'facebook-jssdk'));
3. Save the file and upload at your theme folder.
4. Now, copy the following code and paste at the head section of the source page. Here in WordPress, open header.php file of your theme and paste the code before the closing head tag.
Make sure to put the correct path of defer.js. For example, the source path should be like this:
/wp-content/themes/theme_name/defer.js ______________________________________________________________________________________________
I hope that helps,
Tom
-
happy I could help
-
Thomas,
Can this be implemented on a Wordpress site?
Apologize for hijacking!
-
What a great response! Just what I was looking for. Thank you!
-
lazy loading images is not as good as deferring an image. Because lazy loading images can cause issues can cause JavaScript issues that will not cause problems if you deferred the image instead of lazy loading.
Defer images you will have a easier time the method discussed here does not hurt search engine optimization in fact it will help it because increased load speeds or what people perceive as an increased load speed always helps the end-user.
Here is the best way
https://www.feedthebot.com/pagespeed/defer-images.html
This is where we defer the images without lazy loading
In the scenario of a one page template, there is no reason to do all the things that lazy loading does (observe, monitor and react to a scroll postion).
Why not just defer those images and have them load immediately after the page has loaded?
How to do it
To do this we need to markup our images and add a small and extremely simple javascript. I will show the method I actually use for this site and others. It uses a base 64 image, but do not let that scare you.
The html
The javascript
-
I have looked for information on this in the past and come up empty handed. With page speed Google really pits you against best SEO practices. I think if you follow most of the page speed insights you can severely limit your SEO. How many images are you talking about, how does Google render the page in their fetch as Google?
Got a burning SEO question?
Subscribe to Moz Pro to gain full access to Q&A, answer questions, and ask your own.
Browse Questions
Explore more categories
-
Moz Tools
Chat with the community about the Moz tools.
-
SEO Tactics
Discuss the SEO process with fellow marketers
-
Community
Discuss industry events, jobs, and news!
-
Digital Marketing
Chat about tactics outside of SEO
-
Research & Trends
Dive into research and trends in the search industry.
-
Support
Connect on product support and feature requests.
Related Questions
-
Do long UTM codes hurt SEO?
Since most UTM codes/URLs are longer than 70ish characters, is this hurting my SEO? If it is, how can I solve the problem while still using a UTM code? Thanks!
Technical SEO | | Cassie_Ransom0 -
Magento technical SEO issues
Hi This is lots of questions and don't expect full answers but if anyone can help or put me in touch with some who can that would be great so here are 3 issues we have from some auditing our site Firstly on pages like https://www.tidy-books.co.uk/shop-with-us/sort-by/price/sort-direction/desc so any pages where there is a sortby the cananoical link doesn't seem to be working correctly. So for here it is https://www.tidy-books.co.uk/shop-with-us/sort-by/price/sort-direction/desc"/> but should be https://www.tidy-books.co.uk/shop-with-us"/> secondly with have a lot of duplicate title tags mainly caused from the blog and the above problem see-> http://prntscr.com/b2t9xe but regarding the blog we have an issue where 2 canonical appearing for example this page
Technical SEO | | tidybooks
https://www.tidy-books.co.uk/blog/page/19/ there are 2 canonical links appearing https://www.tidy-books.co.uk/blog/page/19/"/> we want it to be this
https://www.tidy-books.co.uk/blog/"/> Thirdly
Our mobile usability issues have gone up a lot see- > http://prntscr.com/b2tado
I can see what the issue is that this folder https://www.tidy-books.co.uk/skin/frontend/tidybooks/default/images/ was being crawled by google and contains lots of 'index of' pages. I've disallowed directory in robots.txt as shown here -> http://prntscr.com/b2tbc5 is that correct? any help would be great Just to let you know we use magento v1.7 we use SEO suite ultimate extension and we use fishpigs wordpress extension thanks0 -
Speed benefits from loading images from a subdomain
I have read that loading images from a subdomain of your site instead of the main domain will give you speed benefits on load time. Has anyone actually seen that to be the case? Thanks!
Technical SEO | | Gordian0 -
Are pagination a bad thing for seo
hi i am just checking my errors on my site and it is telling me about duplicate pagination results, so i am just wondering if pagination is bad for seo for example http://www.in2town.co.uk/benidorm/benidorm-news/Page-2 i also have page 3 and page 4. should i stop my site from having this to help with seo
Technical SEO | | ClaireH-1848860 -
Webshop migration & SEO
Hi there I am migrating all products from my current trade website http://shop.snowbusiness.com/ to another platform. Whilst both are live, would i have to worry too much about duplicate content and no-follow the pages or is this overkill? Cheers, Ben
Technical SEO | | SnowFX0 -
Does Bitly hurt your SEO?
I often use bit.ly or Google URL shortener in links when other websites post my articles so I can track clicks. However, I am thinking this may HURT my SEO given that it is taking away a back link to my website. Is that logic correct ? If so, what is a good way to be able to track clicks if a website posts your article without jeopardizing the SEO value?
Technical SEO | | StreetwiseReports1 -
Suggestions on how to hire help with my SEO?
Hi, I just signed up with SEOMOZ and found some major duplicate content issues with Wordpress. I have installed Yoast SEO plug in but honestly am a little lost on how Wordpress handles it all and need guidance. I would love to hire someone to do some desktop share / Skype sessions to teach me the proper way to set this up but did not see if there was any place on SEOMOZ where employers and providers can connect. I am interested in more than just this one issue, looking for a freelancer ongoing to work on our site for SEO. Any suggestions? Thanks in advance Force7
Technical SEO | | Force70 -
301 Redirects - SEO Benefit?
Hello, Years ago, our company started out as a Yahoo store. We've since moved onto another website with its own shopping cart but since the Yahoo store is almost 10 years old, there's a lot of history there and it still exists with the occasional order. We currently use it for reputation management purposes with links to our real ecommerce site but we're thinking of just redirecting the Yahoo store to our ecommerce site. Is there any SEO benefit in doing this? We were also kind of penalized by Panda. Would this help us out at all (the descriptions on both sites could be considered duplicate content).
Technical SEO | | airnwater0