{"id":18874,"date":"2020-06-14T13:30:44","date_gmt":"2020-06-14T17:30:44","guid":{"rendered":"https:\/\/www.boldgrid.com\/support\/?p=18874"},"modified":"2024-12-20T10:19:33","modified_gmt":"2024-12-20T15:19:33","slug":"configuring-lazy-loading-for-your-wordpress-website-with-w3-total-cache","status":"publish","type":"post","link":"https:\/\/www.boldgrid.com\/support\/w3-total-cache\/configuring-lazy-loading-for-your-wordpress-website-with-w3-total-cache\/","title":{"rendered":"Configuring Lazy Loading for your WordPress Website with W3 Total Cache"},"content":{"rendered":"<!DOCTYPE html PUBLIC \"-\/\/W3C\/\/DTD HTML 4.0 Transitional\/\/EN\" \"http:\/\/www.w3.org\/TR\/REC-html40\/loose.dtd\">\n<?xml encoding=\"utf-8\" ?><html><body><div class=\"boldgrid-section\">\n<div class=\"container\">\n<div class=\"row\">\n<div class=\"col-lg-12 col-md-12 col-xs-12 col-sm-12\">\n<p class=\"\"><strong>Lazy loading<\/strong> is known by several names like <em>on-demand loading<\/em> or <em>defer offscreen images<\/em>, but the concept for them all is the same, and it is kind of simple. The only images that load are the ones that are in the <em>viewport<\/em> &ndash; the amount of screen that the reader can see.<\/p>\n<p class=\"\">This benefits your WordPress website performance greatly. Because each image takes a certain amount of bandwidth to load for visitors, reducing the bandwidth from your <a href=\"\/wordpress-hosting\/\">WordPress host<\/a> to the user will improve the time it takes for your page to render to the visitor. There is a ton of research online showing how <a href=\"https:\/\/www.cloudflare.com\/learning\/performance\/more\/website-performance-conversion-rates\/\">conversion rates and website speed<\/a> are directly tied to each other. A great example of images using lazy load for performance can be explained using the following scenario: Lets say a user requests a page on your website. If the site only shows the first 1200 pixels, an image that is 2000 pixels down wouldn&rsquo;t be loaded in that initial request, saving you the total size of the image in the request. This can be huge for websites that are visually heavy, and save your visitors tons of time waiting on your web page to load.<\/p>\n<p class=\"\">With W3 Total Cache, our <a href=\"https:\/\/www.boldgrid.com\/w3-total-cache\/\">WordPress Caching Plugin<\/a>, lazy loading can be configured pretty easily. The impact it can have on your website performance can be huge and greatly <a href=\"https:\/\/www.boldgrid.com\/how-to-improve-core-web-vitals\/\">improve Core Web Vitals<\/a> and <a href=\"https:\/\/www.boldgrid.com\/speed-up-wordpress-websites\/\">speed up WordPress<\/a>.<\/p>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<div class=\"boldgrid-section\" style=\"margin-top: 60px;\">\n<div class=\"container w3tc-radius\" style=\"border-width: 0px; background-image: url('https:\/\/www.boldgrid.com\/wp-content\/uploads\/2023\/07\/upsell-darker-alt.png'); background-size: cover; background-position: 50% 5%;\" data-image-url=\"https:\/\/www.boldgrid.com\/wp-content\/uploads\/2023\/07\/upsell-darker-alt.png\">\n<div class=\"row upsell-column\" style=\"padding-top: 2em; padding-bottom: 2em; color: #ffffff;\">\n<div class=\"col-lg-1 col-md-1 col-sm-12 col-xs-12 hidden-sm\">&nbsp;<\/div>\n<div class=\"col-lg-5 col-md-6 col-xs-12 col-sm-7\">\n<p class=\"h3\" style=\"color: #ffffff; line-height: 40px; margin-top: 0;\"><strong>Speed Up Your WordPress Website.<\/strong><\/p>\n<p class=\"h4\" style=\"color: #ffffff;\">A Difference of Just 100ms in Page Load Speeds Can Cause a Visitor to Prefer Your Competitor&rsquo;s Website.<\/p>\n<\/div>\n<div class=\"col-lg-6 col-md-5 col-sm-5 col-xs-12 text-center align-column-center\">\n<p class=\"\" style=\"border-width: 0px;\"><a class=\"button-w3tc-white\" style=\"border: 2px solid #30BEC4; font-size: 18px; padding: 15px 30px;\" href=\"https:\/\/www.boldgrid.com\/w3-total-cache\/#pricing\">View Plans<\/a><\/p>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<div class=\"boldgrid-section\">\n<div class=\"container\">\n<div class=\"row\">\n<div class=\"col-lg-12 col-md-12 col-xs-12 col-sm-12\">\n<h2 id=\"enabling-lazy-loading-for-wordpress-in-w3-total-cache\">Enabling Lazy Loading for WordPress in W3 Total Cache<\/h2>\n<p class=\"\">To enable lazy loading for your WordPress website, the following tutorial will walk you through the steps.<\/p>\n<ul class=\"\">\n<li>In your WordPress Dashboard, Navigate to Performance &rarr; General Settings<\/li>\n<li>Scroll down to User Experience<\/li>\n<li>Select the box to Enable Lazy Loading<\/li>\n<li>Click Save all settings<\/li>\n<\/ul>\n<p class=\"\">That&rsquo;s it! You have now enabled Lazy Loading for images in WordPress with W3 Total Cache. You can fine tune the Lazy Loading configuration further by going to the User Experience page directly. This will give you additional options for things like excluding images from lazy load and the ability to process background images loaded using CSS.<\/p>\n<p class=\"\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-18851\" src=\"https:\/\/www.boldgrid.com\/support\/wp-content\/uploads\/2020\/03\/18843-w3tc-lazy-loading.jpg\" alt=\"W3 Total Cache Lazy Loading Settings\" width=\"1472\" height=\"205\" srcset=\"https:\/\/www.boldgrid.com\/support\/wp-content\/uploads\/2020\/03\/18843-w3tc-lazy-loading.jpg 1472w, https:\/\/www.boldgrid.com\/support\/wp-content\/uploads\/2020\/03\/18843-w3tc-lazy-loading-300x42.jpg 300w, https:\/\/www.boldgrid.com\/support\/wp-content\/uploads\/2020\/03\/18843-w3tc-lazy-loading-1024x143.jpg 1024w, https:\/\/www.boldgrid.com\/support\/wp-content\/uploads\/2020\/03\/18843-w3tc-lazy-loading-768x107.jpg 768w, https:\/\/www.boldgrid.com\/support\/wp-content\/uploads\/2020\/03\/18843-w3tc-lazy-loading-610x85.jpg 610w, https:\/\/www.boldgrid.com\/support\/wp-content\/uploads\/2020\/03\/18843-w3tc-lazy-loading-250x35.jpg 250w, https:\/\/www.boldgrid.com\/support\/wp-content\/uploads\/2020\/03\/18843-w3tc-lazy-loading-550x77.jpg 550w, https:\/\/www.boldgrid.com\/support\/wp-content\/uploads\/2020\/03\/18843-w3tc-lazy-loading-800x111.jpg 800w, https:\/\/www.boldgrid.com\/support\/wp-content\/uploads\/2020\/03\/18843-w3tc-lazy-loading-1292x180.jpg 1292w\" sizes=\"auto, (max-width: 1472px) 100vw, 1472px\" \/><\/p>\n<h2 id=\"fine-tuning-your-lazy-loading-configuration-in-w3-total-cache\">Fine Tuning Your Lazy Loading Configuration in W3 Total Cache<\/h2>\n<ul class=\"\">\n<li>In your WordPress Dashboard, Navigate to Performance &rarr; User Experience<\/li>\n<\/ul>\n<p class=\"\">To fine tune your lazy loading configuration, you have the option of processing img tags in HTML or disabling that, as well as having lazy load process your background images defined in your websites HTML and CSS.<\/p>\n<p>You can also add tags that will exclude images and resources from lazy loading, which you can define directly in the exclude words listing.<\/p>\n<p class=\"\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-18877\" src=\"https:\/\/www.boldgrid.com\/support\/wp-content\/uploads\/2020\/03\/18874-w3tc-lazy-loading-user-experience.jpg\" alt=\"W3 Total Cache Lazy Loading Configuration\" width=\"1499\" height=\"758\" srcset=\"https:\/\/www.boldgrid.com\/support\/wp-content\/uploads\/2020\/03\/18874-w3tc-lazy-loading-user-experience.jpg 1499w, https:\/\/www.boldgrid.com\/support\/wp-content\/uploads\/2020\/03\/18874-w3tc-lazy-loading-user-experience-300x152.jpg 300w, https:\/\/www.boldgrid.com\/support\/wp-content\/uploads\/2020\/03\/18874-w3tc-lazy-loading-user-experience-1024x518.jpg 1024w, https:\/\/www.boldgrid.com\/support\/wp-content\/uploads\/2020\/03\/18874-w3tc-lazy-loading-user-experience-768x388.jpg 768w, https:\/\/www.boldgrid.com\/support\/wp-content\/uploads\/2020\/03\/18874-w3tc-lazy-loading-user-experience-610x308.jpg 610w, https:\/\/www.boldgrid.com\/support\/wp-content\/uploads\/2020\/03\/18874-w3tc-lazy-loading-user-experience-250x126.jpg 250w, https:\/\/www.boldgrid.com\/support\/wp-content\/uploads\/2020\/03\/18874-w3tc-lazy-loading-user-experience-550x278.jpg 550w, https:\/\/www.boldgrid.com\/support\/wp-content\/uploads\/2020\/03\/18874-w3tc-lazy-loading-user-experience-800x405.jpg 800w, https:\/\/www.boldgrid.com\/support\/wp-content\/uploads\/2020\/03\/18874-w3tc-lazy-loading-user-experience-356x180.jpg 356w, https:\/\/www.boldgrid.com\/support\/wp-content\/uploads\/2020\/03\/18874-w3tc-lazy-loading-user-experience-593x300.jpg 593w, https:\/\/www.boldgrid.com\/support\/wp-content\/uploads\/2020\/03\/18874-w3tc-lazy-loading-user-experience-989x500.jpg 989w\" sizes=\"auto, (max-width: 1499px) 100vw, 1499px\" \/><\/p>\n<p class=\"\">Finally, you can also select the script embed method where your options are async, sync to head and inline. Inline is only recommended when you have a small website, with only a few pages.<\/p>\n<p class=\"\">Once you have made your choices, click Save all settings and you should be good to go. Now, you may want to run a Performance Test to see how your changes have affected your PageSpeed scores. In almost all testing scenarios, lazy loading for WordPress improves the user experience of websites across the board. Try W3 Total Cache, one of the <a href=\"https:\/\/www.boldgrid.com\/5-best-wordpress-cache-plugins\/\">best WordPress cache plugins<\/a>, now and see for yourself, the performance increases will amaze you.<\/p>\n<h2 class=\"\" id=\"lazy-loading-in-wordpress-faqs\">Lazy Loading in WordPress FAQs<\/h2>\n<h3 id=\"how-do-i-exclude-an-image-from-lazy-loading\">How do I exclude an image from Lazy Loading?<\/h3>\n<p class=\"\">You can add the class &ldquo;skip-lazy&rdquo; to stop any image from lazy loading.<\/p>\n<h3 class=\"\" id=\"how-do-i-exclude-svg-files-from-being-lazy-loaded\">How do I exclude SVG files from being lazy loaded?<\/h3>\n<p class=\"\">You can exclude a specific image from lazy loading by adding the image URL to <strong>Performance &gt; User Experience &gt; Exclude words:<\/strong><br>\nSo for example:<a href=\"https:\/\/yourwebsite.com\/wp-content\/uploads\/2021\/02\/headerimage.svg\"> https:\/\/yourwebsite.com\/wp-content\/uploads\/2021\/02\/headerimage.svg<\/a><br>\nDon&rsquo;t forget to save all settings and purge the cache when done!<\/p>\n<h3 class=\"\" id=\"whats-the-difference-between-lazy-loading-in-core-and-total-cache\">What&rsquo;s the difference between Lazy Loading in Core and Total Cache?<\/h3>\n<p>WordPress Core started adding the <b>loading=&ldquo;lazy&rdquo;<\/b> tag in WordPress 5.5. It is implemented by the browser rather than a plugin. You can and likely should still use Lazy Loading through the W3 Total Cache plugin.<\/p>\n<p class=\"\">WordPress Core&rsquo;s implementation is browser-based and<a href=\"https:\/\/caniuse.com\/loading-lazy-attr\"> not supported fully by many browsers<\/a>. W3 Total Cache&rsquo;s implementation uses lightweight JavaScript. It will deliver a better user experience to your users who aren&rsquo;t browsing with a compatible browser. WordPress recently announced there will be <a href=\"https:\/\/make.wordpress.org\/core\/2021\/07\/15\/refining-wordpress-cores-lazy-loading-implementation\/\">changes to Core&rsquo;s lazy-loading approach<\/a> in WordPress 5.9.<\/p>\n<h3 class=\"\" id=\"lazy-load-google-maps\">Lazy Load Google Maps<\/h3>\n<p class=\"\">W3 Total Cache Pro has the ability to <a href=\"https:\/\/www.boldgrid.com\/support\/w3-total-cache\/lazy-load-google-maps\/\">lazy load Google maps<\/a>. In our testing, lazy loading the map resulted in an 11 point increase in the Lighthouse performance score.<\/p>\n<p class=\"\">To enable lazy-loading Google Maps navigate to <b>Performance &gt; User Experience<\/b> and check the box to enable your plugin. Remember, if you do not have an active Pro license, you will not see this option.<\/p>\n<p class=\"\">Upgrade to W3 Total Cache Pro today to improve the speed of your Google Maps. You&rsquo;ll also get access to other professional performance features, such as Defer Render-Blocking CSS, Full Site CDN Delivery, WPML integration, and many more.<\/p>\n<p class=\"\">&nbsp;<\/p>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/body><\/html>\n","protected":false},"excerpt":{"rendered":"<p>Lazy loading is known by several names like on-demand loading or defer offscreen images, but the concept for them all is the same, and it is kind of simple. The only images that load are the ones that are in the viewport &ndash; the amount of screen that the reader can see. This benefits your [&hellip;]<\/p>\n","protected":false},"author":529,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"_bbp_topic_count":0,"_bbp_reply_count":0,"_bbp_total_topic_count":0,"_bbp_total_reply_count":0,"_bbp_voice_count":0,"_bbp_anonymous_reply_count":0,"_bbp_topic_count_hidden":0,"_bbp_reply_count_hidden":0,"_bbp_forum_subforum_count":0,"bgseo_title":"Configuring Lazy Loading for WordPress with W3 Total Cache","bgseo_description":"Lazy loading is known by several names such as on-demand loading or defer offscreen images, but the concept is simple. The only images that load are the ones that are in the viewport at the time of page load. The following guide will help you enable lazy loading for WordPress with W3 Total Cache.","bgseo_robots_index":"index","bgseo_robots_follow":"follow","footnotes":""},"categories":[747,692],"tags":[],"class_list":["post-18874","post","type-post","status-publish","format-standard","hentry","category-user-experience","category-w3-total-cache"],"acf":[],"_links":{"self":[{"href":"https:\/\/www.boldgrid.com\/support\/wp-json\/wp\/v2\/posts\/18874","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.boldgrid.com\/support\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.boldgrid.com\/support\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.boldgrid.com\/support\/wp-json\/wp\/v2\/users\/529"}],"replies":[{"embeddable":true,"href":"https:\/\/www.boldgrid.com\/support\/wp-json\/wp\/v2\/comments?post=18874"}],"version-history":[{"count":19,"href":"https:\/\/www.boldgrid.com\/support\/wp-json\/wp\/v2\/posts\/18874\/revisions"}],"predecessor-version":[{"id":151572,"href":"https:\/\/www.boldgrid.com\/support\/wp-json\/wp\/v2\/posts\/18874\/revisions\/151572"}],"wp:attachment":[{"href":"https:\/\/www.boldgrid.com\/support\/wp-json\/wp\/v2\/media?parent=18874"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.boldgrid.com\/support\/wp-json\/wp\/v2\/categories?post=18874"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.boldgrid.com\/support\/wp-json\/wp\/v2\/tags?post=18874"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}