{"id":12263,"date":"2022-08-02T06:00:35","date_gmt":"2022-08-02T10:00:35","guid":{"rendered":"https:\/\/blog.litespeedtech.com\/?p=12263"},"modified":"2022-08-02T06:00:35","modified_gmt":"2022-08-02T10:00:35","slug":"viewport-images-service","status":"publish","type":"post","link":"https:\/\/lswp.store\/index.php\/2022\/08\/02\/viewport-images-service\/","title":{"rendered":"LSCWP 5.0: Viewport Images Service"},"content":{"rendered":"<p><img fetchpriority=\"high\" decoding=\"async\" class=\"alignnone size-full wp-image-12265\" src=\"https:\/\/lswp.store\/wp-content\/uploads\/2022\/07\/vpi.png\" alt=\"Viewport Images Service LSCWP 5.0\" width=\"1000\" height=\"500\" srcset=\"https:\/\/lswp.store\/wp-content\/uploads\/2022\/07\/vpi.png 1000w, https:\/\/lswp.store\/wp-content\/uploads\/2022\/07\/vpi-300x150.png 300w, https:\/\/lswp.store\/wp-content\/uploads\/2022\/07\/vpi-768x384.png 768w, https:\/\/lswp.store\/wp-content\/uploads\/2022\/07\/vpi-600x300.png 600w\" sizes=\"(max-width: 1000px) 100vw, 1000px\" \/><\/p>\n<p>LiteSpeed Cache v5.0 for WordPress is here, and along with it comes a new QUIC.cloud service: <strong>Viewport Images<\/strong>, also known as VPI!<\/p>\n<p>VPI joins QUIC.cloud\u2019s other WordPress optimization services: <a href=\"https:\/\/lswp.store\/2018\/06\/20\/critical-css-and-litespeed-cache\/\">Critical CSS<\/a> (CCSS), <a href=\"https:\/\/lswp.store\/2021\/06\/14\/unique-css-for-wordpress\/\">Unique CSS<\/a> (UCSS), <a href=\"https:\/\/quic.cloud\/docs\/online-services\/lqip\/\">Low-Quality Image Placeholders<\/a> (LQIP), and <a href=\"https:\/\/docs.litespeedtech.com\/lscache\/lscwp\/imageopt\/\">Image Optimization<\/a>.<\/p>\n<p>The Viewport Images service was introduced as a way to improve user experience on lazy loading sites.<\/p>\n<h2>The Lazy Load Problem<\/h2>\n<p>Do you have <strong>Lazy Load Images<\/strong> enabled for your website? If so, then you know that the transmission of each image is delayed until it is needed, loading as it scrolls into the viewport. This is mainly a good thing, because it saves bandwidth and improves your page\u2019s speed.<\/p>\n<p>Lazy load\u2019s biggest flaw is in the treatment of above-the-fold imagery. That first screenful of content may have several gray boxes appearing where the images should be, for as long as it takes for the rest of the page\u2019s content to load. Depending on your site design, it may not give the best first impression to postpone image rendering.<\/p>\n<p>The LiteSpeed Cache plugin has already provided a few handy ways to cope with this:<\/p>\n<ul>\n<li><strong>Responsive Placeholder<\/strong> lets you change the <strong>Responsive Placeholder Color<\/strong> from gray to something that fits your site design better. Maybe you\u2019d like pale green boxes, for example.<\/li>\n<li><strong>LQIP Cloud Generator<\/strong> lets you replace the solid-color placeholders with extremely blurry fast-loading versions of the original images. I use this with my own personal site, because I think it\u2019s fun for the placeholders to resemble the images that belong in those spots<\/li>\n<\/ul>\n<p>These remain viable options. But there will still be a few moments before all of the content has loaded, where placeholders are standing in for your imagery. No matter how nice those placeholders will be, it still means that your page may look somewhat incomplete.<\/p>\n<h2>The VPI Solution<\/h2>\n<p>In a perfect world, all images would be lazy loaded except for those that are already in the viewport when the page initially loads. Those images should be excluded from lazy loading. That is what VPI does.<\/p>\n<p>The VPI service examines a URL, and determines which images are visible on a 1300&#215;900 pixel screen for desktop views, and which images are visible on a 480&#215;800 screen for mobile views. It returns a list of those images to the LiteSpeed plugin, and LiteSpeed then excludes them from lazy load next time it caches that URL.<\/p>\n<p>The result is a page that is fully rendered above the fold, while every image below the fold continues to behave as before. Your site retains its good page speed score, while your human visitors enjoy a complete first screenful of content.<\/p>\n<h2>The QUIC.cloud Connection<\/h2>\n<p>VPI is a <a href=\"https:\/\/quic.cloud\/quic-cloud-services-and-features\/\">QUIC.cloud service<\/a>. If you have never used any previous QUIC.cloud services for your domain, you will need to navigate to the <strong>General<\/strong> page of the LiteSpeed Cache plugin. On the <strong>General Settings<\/strong> tab, click the <strong>Request Domain Key<\/strong> button in the <strong>Domain Key<\/strong> setting, and wait a few minutes for it to generate.<\/p>\n<p>Once you have your domain key, you are ready to start using VPI.<\/p>\n<p>VPI is one of three QUIC.cloud Page Optimization services. CCSS and UCSS are the other two. QUIC.cloud allows you to use the page optimization services for free to a certain extent each month. Once your free quota runs out, you can either wait until the next month for it to regenerate automatically at no cost, or you can purchase more. <a href=\"https:\/\/quic.cloud\/docs\/billing\/all-about-quota-and-credits\/\">There\u2019s more information about how that works at QUIC.cloud<\/a>.<\/p>\n<h2>How to use VPI<\/h2>\n<p>To get started using VPI, navigate to <strong>Page Optimization &gt; Media Settings<\/strong> in the LiteSpeed Cache plugin, and enable <strong>Lazy Load Images<\/strong> if you haven\u2019t already. Save your settings and visit the <strong>VPI<\/strong> tab.<\/p>\n<p><img decoding=\"async\" class=\"alignnone size-full wp-image-12269\" src=\"https:\/\/lswp.store\/wp-content\/uploads\/2022\/07\/vpi2.png\" alt=\"VPI Viewport Images Settings\" width=\"1019\" height=\"495\" srcset=\"https:\/\/lswp.store\/wp-content\/uploads\/2022\/07\/vpi2.png 1019w, https:\/\/lswp.store\/wp-content\/uploads\/2022\/07\/vpi2-300x146.png 300w, https:\/\/lswp.store\/wp-content\/uploads\/2022\/07\/vpi2-768x373.png 768w, https:\/\/lswp.store\/wp-content\/uploads\/2022\/07\/vpi2-600x291.png 600w\" sizes=\"(max-width: 1019px) 100vw, 1019px\" \/><\/p>\n<p>There you will find two settings:<\/p>\n<ul>\n<li><strong>Viewport Images<\/strong>: This setting defaults to <code>OFF<\/code>. Turn it <code>ON<\/code> to enable the VPI service.<\/li>\n<li><strong>Viewport Images Cron<\/strong>: When <strong>Viewport Images<\/strong> is enabled, and this setting is set to <code>ON<\/code>, Viewport Images will be generated in the background via a cron-based queue. If you disable this setting, then you will need to process the VPI queue manually. You can do so by pressing the <strong>Run VPI Queue Manually<\/strong> button that will appear on this page when there are URLs in the queue. Or, you can do it on the <strong>Dashboard<\/strong> as described later.<\/li>\n<\/ul>\n<p><img decoding=\"async\" class=\"alignnone size-large wp-image-12271\" src=\"https:\/\/lswp.store\/wp-content\/uploads\/2022\/07\/vpi2a-1024x686.png\" alt=\"VPI Viewport Images Settings\" width=\"1024\" height=\"686\" srcset=\"https:\/\/lswp.store\/wp-content\/uploads\/2022\/07\/vpi2a-1024x686.png 1024w, https:\/\/lswp.store\/wp-content\/uploads\/2022\/07\/vpi2a-300x201.png 300w, https:\/\/lswp.store\/wp-content\/uploads\/2022\/07\/vpi2a-768x514.png 768w, https:\/\/lswp.store\/wp-content\/uploads\/2022\/07\/vpi2a-600x402.png 600w, https:\/\/lswp.store\/wp-content\/uploads\/2022\/07\/vpi2a.png 1033w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/p>\n<p>The VPI queue is populated as people begin to visit the pages on your site. When a page is loaded, if no VPI is yet defined, the page will be added to the queue for background processing. If the page already has VPI defined, then it will not be added to the queue.<\/p>\n<p>That\u2019s all you need to do to start using VPI, but there are a few other handy things to know.<\/p>\n<h3>Tweaking VPI Post-by-Post<\/h3>\n<p>WordPress editors (both the Classic Editor and Block Editor) have a new metabox called <strong>LiteSpeed Options<\/strong>. This allows you to easily tweak some settings on a post-by-post basis.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-12273\" src=\"https:\/\/lswp.store\/wp-content\/uploads\/2022\/07\/vpi3a.png\" alt=\"LiteSpeed Metabox in WordPress Editor\" width=\"290\" height=\"450\" srcset=\"https:\/\/lswp.store\/wp-content\/uploads\/2022\/07\/vpi3a.png 290w, https:\/\/lswp.store\/wp-content\/uploads\/2022\/07\/vpi3a-193x300.png 193w\" sizes=\"(max-width: 290px) 100vw, 290px\" \/><\/p>\n<p>If the post has already been processed for VPI, you will see entries in one or both of the <strong>Viewport Images<\/strong> boxes. You can manipulate these values any way you like. Remember, any image listed in these settings will <em>not<\/em> be lazy loaded. You can:<\/p>\n<ul>\n<li>remove images that you <em>do<\/em> want lazy loaded<\/li>\n<li>add your own list of images that you want to exclude from lazy loading for this URL<\/li>\n<li>clear the boxes and force a VPI recalculation<\/li>\n<\/ul>\n<p>If the post has not already been processed for VPI, both settings will be empty. If you want to, you could add images to the <strong>Viewport Images<\/strong> and\/or <strong>Viewport Images &#8211; Mobile<\/strong> box manually. LiteSpeed will respect these values and will not send the post out for VPI processing.<\/p>\n<h3>Monitoring VPI Usage<\/h3>\n<p>VPI usage is reflected in the LiteSpeed Cache <strong>Dashboard<\/strong>, along with other QUIC.cloud services.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-12275\" src=\"https:\/\/lswp.store\/wp-content\/uploads\/2022\/07\/vpi4.png\" alt=\"Dashboard LiteSpeed Cache for WordPress\" width=\"1022\" height=\"277\" srcset=\"https:\/\/lswp.store\/wp-content\/uploads\/2022\/07\/vpi4.png 1022w, https:\/\/lswp.store\/wp-content\/uploads\/2022\/07\/vpi4-300x81.png 300w, https:\/\/lswp.store\/wp-content\/uploads\/2022\/07\/vpi4-768x208.png 768w, https:\/\/lswp.store\/wp-content\/uploads\/2022\/07\/vpi4-600x163.png 600w\" sizes=\"(max-width: 1022px) 100vw, 1022px\" \/><\/p>\n<p>Take a look at the <strong>Page Optimization<\/strong> column in the <strong>QUIC.cloud Service Usage Statistics<\/strong> section. It displays the number of requests sent, how many you have left for the month, and how many you have left for the day. If you have purchased additional quota, you will see that here, too.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-12277\" src=\"https:\/\/lswp.store\/wp-content\/uploads\/2022\/07\/vpi5.png\" alt=\"Dashboard LiteSpeed Cache for WordPress\" width=\"1023\" height=\"258\" srcset=\"https:\/\/lswp.store\/wp-content\/uploads\/2022\/07\/vpi5.png 1023w, https:\/\/lswp.store\/wp-content\/uploads\/2022\/07\/vpi5-300x76.png 300w, https:\/\/lswp.store\/wp-content\/uploads\/2022\/07\/vpi5-768x194.png 768w, https:\/\/lswp.store\/wp-content\/uploads\/2022\/07\/vpi5-600x151.png 600w\" sizes=\"(max-width: 1023px) 100vw, 1023px\" \/><\/p>\n<p>Scroll down to the <strong>Viewport Image (VPI)<\/strong> box to manage the queue. You can see if you have any URLs in the queue and the date and time of the last request. If you have entries in the queue, the <strong>Force Cron<\/strong> button will become available. Press it if you want to process those requests immediately.<\/p>\n<h2>Conclusion<\/h2>\n<p>Lazy Load is a terrific tool. It allows visitors to begin using your site immediately. There is no need to wait for all of the page\u2019s images to transfer. The new Viewport Images service is the proverbial cherry on top of your domain\u2019s lazy load sundae. VPI allows your site to reap the benefits of lazy load, while presenting a polished and professional above-the-fold experience for all of your visitors.<\/p>\n<p>Upgrade to <a href=\"https:\/\/wordpress.org\/plugins\/litespeed-cache\/\">LiteSpeed Cache v5.0 for WordPress<\/a>, and try VPI today!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Introducing LiteSpeed Cache&#8217;s new Viewport Images service, provided by QUIC.cloud. Automatically exclude above the fold images from Lazy Load.<\/p>\n","protected":false},"author":1,"featured_media":12265,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[28],"tags":[157,298,316],"class_list":["post-12263","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-cache","tag-lazy-load","tag-viewport-images","tag-wordpress"],"jetpack_featured_media_url":"https:\/\/lswp.store\/wp-content\/uploads\/2022\/07\/vpi.png","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/lswp.store\/index.php\/wp-json\/wp\/v2\/posts\/12263","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/lswp.store\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/lswp.store\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/lswp.store\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/lswp.store\/index.php\/wp-json\/wp\/v2\/comments?post=12263"}],"version-history":[{"count":0,"href":"https:\/\/lswp.store\/index.php\/wp-json\/wp\/v2\/posts\/12263\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/lswp.store\/index.php\/wp-json\/wp\/v2\/media\/12265"}],"wp:attachment":[{"href":"https:\/\/lswp.store\/index.php\/wp-json\/wp\/v2\/media?parent=12263"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/lswp.store\/index.php\/wp-json\/wp\/v2\/categories?post=12263"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/lswp.store\/index.php\/wp-json\/wp\/v2\/tags?post=12263"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}