Excluding images from lazy loading
-
Hello,
For my website i am trying to exclude some images from lazyloading. I am trying to exclude some images above the fold because the ‘VPI’ function is not working as i want to.
Excluding images by file name is not really a good option, because some images from these are loaded above the fold, others are not.
My original idea is to add an image class as parent class for the images i wish not to be lazy loading, only it does not work. I have added the class as parent and excluded the images inside from being lazy loaded
See: https://prnt.sc/QNU9RmsoIIUN
And the images are still lazy loaded.
How can this be setup the right way?
The page I need help with: [log in to see the link]
-
you need to check in source code , not from console , and I don’t see
no-lazyload
class name , you should choose one of these I marked with red-line@qtwk understand. But also in the source code you can see ‘no-lazy-load
Check here on your screenshot: https://prnt.sc/MCSi66QVoxnCAlso when i check source code, it is there.. https://prnt.sc/3qvKbPALJGIW
now you makes me think it may not take parent’s parent class , try
elementor-widget-container
, see if it works@qtwk well then we are on the same page.. have been frustrated since last night about it, because ive read so many theads (also ones you replied to) it should work with the above parents classes too.
Adding ‘elementor-widget-container’ does work. See: https://prnt.sc/KwYY58yHO9sX
Only this does not help with my issue i am afraid.
try
elementor-element
, see if it worksif not , please enable plugin debug log , let’s see what log says
@qtwrk, seems this works too; https://prnt.sc/-g7Nhp3Xnmr2 weird.
How you want me to share the log?
- This reply was modified 9 months, 1 week ago by chartnet.
02/18/24 12:17:13.401 [00.00.00.00:37740 1 lIK] ?? ------POST HTTP/1.1 (HTTPS) /wp-admin/admin-ajax.php 02/18/24 12:17:13.401 [00.00.00.00:37740 1 lIK] Query String: 02/18/24 12:17:13.401 [00.00.00.00:37740 1 lIK] HTTP_REFERER: --------------- 02/18/24 12:17:13.401 [00.00.00.00:37740 1 lIK] Cookie _lscache_vary: admin_bar:1;guest_mode:1;logged-in:1;role:99 02/18/24 12:17:13.521 [5.254.117.208:37756 1 6dJ] ?? ------POST HTTP/1.1 (HTTPS) /wp-cron.php 02/18/24 12:17:13.521 [5.254.117.208:37756 1 6dJ] Query String: doing_wp_cron=1708258632.8802480697631835937500 02/18/24 12:17:13.728 [00.00.00.00:37730 1 oYm] ?? ------GET HTTP/1.1 (HTTPS) /wp-admin/admin.php 02/18/24 12:17:13.728 [00.00.00.00:37730 1 oYm] Query String: page=litespeed-toolbox 02/18/24 12:17:13.728 [00.00.00.00:37730 1 oYm] HTTP_REFERER: ------------- 02/18/24 12:17:13.728 [00.00.00.00:37730 1 oYm] Cookie _lscache_vary: admin_bar:1;guest_mode:1;logged-in:1;role:99 02/18/24 12:17:13.728 [00.00.00.00:37730 1 oYm] LSCACHE_VARY_VALUE: +webp 02/18/24 12:17:13.885 [00.00.00.00:37740 1 lIK] ?? No cache due to Admin page 02/18/24 12:17:14.239 [00.00.00.00:37740 1 lIK] [Ctrl] X Cache_control -> no Cache ( logged in user ) 02/18/24 12:17:14.302 [00.00.00.00:37730 1 oYm] ?? No cache due to Admin page 02/18/24 12:17:14.458 [5.254.117.208:37756 1 6dJ] [Router] get_role: 02/18/24 12:17:14.461 [5.254.117.208:37756 1 6dJ] ?? Suppress default WP lazyload 02/18/24 12:17:14.466 [5.254.117.208:37756 1 6dJ] [Optm] init 02/18/24 12:17:14.598 [00.00.00.00:37740 1 lIK] [Ctrl] not cacheable before ctrl finalize 02/18/24 12:17:14.598 [00.00.00.00:37740 1 lIK] [Router] get_role: administrator 02/18/24 12:17:14.599 [00.00.00.00:37740 1 lIK] [Ctrl] ? forced no cache [reason] DONOTCACHEPAGE const 02/18/24 12:17:14.599 [00.00.00.00:37740 1 lIK] ?? X-LiteSpeed-Cache-Control: no-cache 02/18/24 12:17:14.599 [00.00.00.00:37740 1 lIK] [Vary] uid: 1 02/18/24 12:17:14.599 [00.00.00.00:37740 1 lIK] [Core] run hook litespeed_buffer_finalize 02/18/24 12:17:14.599 [00.00.00.00:37740 1 lIK] [Core] Silence Comment due to REST/AJAX 02/18/24 12:17:14.600 [00.00.00.00:37740 1 lIK] Response headers --- array ( 0 => 'X-Powered-By: PHP/8.0.30', 1 => 'Pragma: no-cache', 2 => 'Access-Control-Allow-Origin: https://onlinechartnet.nl', 3 => 'Access-Control-Allow-Credentials: true', 4 => 'X-Robots-Tag: noindex', 5 => 'X-Content-Type-Options: nosniff', 6 => 'Referrer-Policy: strict-origin-when-cross-origin', 7 => 'X-Frame-Options: SAMEORIGIN', 8 => 'Content-Type: application/json; charset=UTF-8', 9 => 'Expires: Wed, 11 Jan 1984 05:00:00 GMT', 10 => 'Cache-Control: no-cache, must-revalidate, max-age=0, no-store, private', 11 => 'X-LiteSpeed-Cache-Control: no-cache', ) 02/18/24 12:17:14.600 [00.00.00.00:37740 1 lIK] End response --------------------------------------------------Duration: 1,203.30 ms------------------------------ 02/18/24 12:17:14.688 [00.00.00.00:37730 1 oYm] [Ctrl] X Cache_control -> no Cache ( logged in user ) 02/18/24 12:17:14.827 [5.254.117.208:37756 1 6dJ] [VPI] cron start 02/18/24 12:17:14.838 [5.254.117.208:37756 1 6dJ] [Avatar] no queue 02/18/24 12:17:14.858 [5.254.117.208:37756 1 6dJ] ??? allowance_max 200 wet_limit 02/18/24 12:17:14.858 [5.254.117.208:37756 1 6dJ] ??? preparing images to push 02/18/24 12:17:14.913 [5.254.117.208:37756 1 6dJ] ? async call to -----
log is incorrect, please try use the
debug include URI
@qtwrk, what you need me to fill in? I filled in the path now. See: https://prnt.sc/_qn4UQPKqiiq
Media exclude settings: https://prnt.sc/QV_CllCOB5Pz
02/18/24 19:13:32.985 [00.00.00.00:55108 1 gnT] ?? ------GET HTTP/1.1 (HTTPS) /website-laten-maken/ 02/18/24 19:13:32.985 [00.00.00.00:55108 1 gnT] Query String: 02/18/24 19:13:32.985 [00.00.00.00:55108 1 gnT] HTTP_REFERER: https://onlinechartnet.nl/website-laten-maken/ 02/18/24 19:13:32.985 [00.00.00.00:55108 1 gnT] Cookie _lscache_vary: guest_mode:1 02/18/24 19:13:32.985 [00.00.00.00:55108 1 gnT] LSCACHE_VARY_VALUE: +webp 02/18/24 19:13:33.783 [00.00.00.00:55108 1 gnT] [Router] get_role: 02/18/24 19:13:33.786 [00.00.00.00:55108 1 gnT] ?? Suppress default WP lazyload 02/18/24 19:13:33.791 [00.00.00.00:55108 1 gnT] [Optm] init 02/18/24 19:13:34.105 [00.00.00.00:55108 1 gnT] ?? [Tag] Add --- HTTP.200 02/18/24 19:13:34.105 [00.00.00.00:55108 1 gnT] [Ctrl] X Cache_control init on 02/18/24 19:13:34.198 [00.00.00.00:55108 1 gnT] [Tool] Deregistered frontend heartbeat 02/18/24 19:13:34.775 [00.00.00.00:55108 1 gnT] [Core] Footer hook called 02/18/24 19:13:34.837 [00.00.00.00:55108 1 gnT] [Core] Footer check failed: 3-<footer class="xs-footer-section footer-group" style="background-image: url('https://onlinechartnet. 02/18/24 19:13:34.837 [00.00.00.00:55108 1 gnT] [Router] get_role: 02/18/24 19:13:34.838 [00.00.00.00:55108 1 gnT] [Router] get_role: 02/18/24 19:13:34.838 [00.00.00.00:55108 1 gnT] [Vary] role id: failed, guest 02/18/24 19:13:34.838 [00.00.00.00:55108 1 gnT] [Router] get_role: 02/18/24 19:13:34.838 [00.00.00.00:55108 1 gnT] [Router] get_role: 02/18/24 19:13:34.838 [00.00.00.00:55108 1 gnT] ?? X-LiteSpeed-Cache-Control: public,max-age=604800 02/18/24 19:13:34.839 [00.00.00.00:55108 1 gnT] [Router] get_role: 02/18/24 19:13:34.839 [00.00.00.00:55108 1 gnT] [Vary] role id: failed, guest 02/18/24 19:13:34.839 [00.00.00.00:55108 1 gnT] [Router] get_role: 02/18/24 19:13:34.839 [00.00.00.00:55108 1 gnT] [Router] get_role: 02/18/24 19:13:34.839 [00.00.00.00:55108 1 gnT] ?? X-LiteSpeed-Tag: 35c_HTTP.200,35c_page,35c_URL./website-laten-maken/,35c_Po.2356,35c_PGS,35c_ 02/18/24 19:13:34.840 [00.00.00.00:55108 1 gnT] [Core] Footer check passed 02/18/24 19:13:34.840 [00.00.00.00:55108 1 gnT] [Core] run hook litespeed_buffer_finalize 02/18/24 19:13:34.840 [00.00.00.00:55108 1 gnT] ?? finalize 02/18/24 19:13:34.866 [00.00.00.00:55108 1 gnT] ?? ?? Missing sizes for image [src] https://onlinechartnet.nl/wp-content/themes/hostinza/assets/images/flags/006-united-states.svg 02/18/24 19:13:34.866 [00.00.00.00:55108 1 gnT] ?? ?? Missing sizes for image [src] https://onlinechartnet.nl/wp-content/themes/hostinza/assets/images/flags/002-canada.svg 02/18/24 19:13:34.867 [00.00.00.00:55108 1 gnT] ?? ?? Missing sizes for image [src] https://onlinechartnet.nl/wp-content/themes/hostinza/assets/images/flags/003-vietnam.svg 02/18/24 19:13:34.867 [00.00.00.00:55108 1 gnT] ?? ?? Missing sizes for image [src] https://onlinechartnet.nl/wp-content/themes/hostinza/assets/images/flags/004-france.svg 02/18/24 19:13:34.867 [00.00.00.00:55108 1 gnT] ?? ?? Missing sizes for image [src] https://onlinechartnet.nl/wp-content/themes/hostinza/assets/images/flags/005-germany.svg 02/18/24 19:13:34.873 [00.00.00.00:55108 1 gnT] [Optm] start 02/18/24 19:13:34.875 [00.00.00.00:55108 1 gnT] [CCSS] Separate CCSS due to posttype setting: page 02/18/24 19:13:34.875 [00.00.00.00:55108 1 gnT] [Router] get_role: 02/18/24 19:13:34.875 [00.00.00.00:55108 1 gnT] [Vary] role id: failed, guest 02/18/24 19:13:34.875 [00.00.00.00:55108 1 gnT] [Router] get_role: 02/18/24 19:13:34.875 [00.00.00.00:55108 1 gnT] [Router] get_role: 02/18/24 19:13:36.273 [00.00.00.00:55108 1 gnT] [Optm] js defer exclude https://onlinechartnet.nl/wp-includes/js/jquery/jquery.min.js?ver=3.7.1
is that full log ?
@qtwrk, no idea… heres the full page
02/18/24 19:13:28.162 [00.00.00.00:60108 1 22v] ?? ------GET HTTP/1.1 (HTTPS) /website-laten-maken/ 02/18/24 19:13:28.162 [00.00.00.00:60108 1 22v] Query String: 02/18/24 19:13:28.162 [00.00.00.00:60108 1 22v] LSCACHE_VARY_VALUE: +webp 02/18/24 19:13:28.909 [00.00.00.00:60108 1 22v] [Vary] ???? Guest mode 02/18/24 19:13:28.913 [00.00.00.00:60108 1 22v] ?? Suppress default WP lazyload 02/18/24 19:13:28.918 [00.00.00.00:60108 1 22v] [Optm] init 02/18/24 19:13:29.294 [00.00.00.00:60108 1 22v] ?? [Tag] Add --- HTTP.200 02/18/24 19:13:29.295 [00.00.00.00:60108 1 22v] [Ctrl] X Cache_control init on 02/18/24 19:13:29.434 [00.00.00.00:60108 1 22v] [Tool] Deregistered frontend heartbeat 02/18/24 19:13:30.414 [00.00.00.00:60108 1 22v] [Core] Footer hook called 02/18/24 19:13:30.928 [00.00.00.00:60108 1 22v] [Core] Footer check failed: 3-<footer class="xs-footer-section footer-group" style="background-image: url('https://onlinechartnet. 02/18/24 19:13:30.928 [00.00.00.00:60108 1 22v] [Router] get_role: 02/18/24 19:13:30.929 [00.00.00.00:60108 1 22v] ?? X-LiteSpeed-Cache-Control: public,max-age=604800 02/18/24 19:13:30.929 [00.00.00.00:60108 1 22v] ?? X-LiteSpeed-Tag: 35c_HTTP.200,35c_page,35c_URL./website-laten-maken/,35c_Po.2356,35c_PGS,35c_guest,35c_ 02/18/24 19:13:30.930 [00.00.00.00:60108 1 22v] [Core] Footer check passed 02/18/24 19:13:30.930 [00.00.00.00:60108 1 22v] [Core] run hook litespeed_buffer_finalize 02/18/24 19:13:30.930 [00.00.00.00:60108 1 22v] ?? finalize 02/18/24 19:13:30.954 [00.00.00.00:60108 1 22v] ?? ?? Missing sizes for image [src] https://onlinechartnet.nl/wp-content/themes/hostinza/assets/images/flags/006-united-states.svg 02/18/24 19:13:30.954 [00.00.00.00:60108 1 22v] ?? ?? Missing sizes for image [src] https://onlinechartnet.nl/wp-content/themes/hostinza/assets/images/flags/002-canada.svg 02/18/24 19:13:30.955 [00.00.00.00:60108 1 22v] ?? ?? Missing sizes for image [src] https://onlinechartnet.nl/wp-content/themes/hostinza/assets/images/flags/003-vietnam.svg 02/18/24 19:13:30.955 [00.00.00.00:60108 1 22v] ?? ?? Missing sizes for image [src] https://onlinechartnet.nl/wp-content/themes/hostinza/assets/images/flags/004-france.svg 02/18/24 19:13:30.956 [00.00.00.00:60108 1 22v] ?? ?? Missing sizes for image [src] https://onlinechartnet.nl/wp-content/themes/hostinza/assets/images/flags/005-germany.svg 02/18/24 19:13:30.960 [00.00.00.00:60108 1 22v] [Optm] start 02/18/24 19:13:30.962 [00.00.00.00:60108 1 22v] [CCSS] Separate CCSS due to posttype setting: page 02/18/24 19:13:30.973 [00.00.00.00:60108 1 22v] [Optm] rm css snippet [Google fonts] https://fonts.googleapis.com/css?family=Roboto%3Aregular%7CKarla%3A400%2C700%7CRubik%3A300%2C400%2C500%2C700&ver=3.1.0 02/18/24 19:13:30.978 [00.00.00.00:60108 1 22v] [Optm] rm css snippet [Google fonts] https://fonts.googleapis.com/css?family=Roboto%3A100%2C100italic%2C200%2C200italic%2C300%2C300italic%2C400%2C400italic%2C500%2C500italic%2C600%2C600italic%2C700%2C700italic%2C800%2C800italic%2C900%2C900italic%7CRoboto+Slab%3A100%2C100italic%2C200%2C200italic%2C300%2C300italic%2C400%2C400italic%2C500%2C500italic%2C600%2C600italic%2C700%2C700italic%2C800%2C800italic%2C900%2C900italic&display=swap&ver=6.4.3 02/18/24 19:13:30.983 [00.00.00.00:60108 1 22v] ?? [Tag] Add --- MIN.9e897568277eee3a0f354de75dca3671.css 02/18/24 19:13:32.281 [00.00.00.00:60108 1 22v] ?? [Tag] Add --- MIN.1d670d609054172777fb278500444d18.js 02/18/24 19:13:32.321 [00.00.00.00:60108 1 22v] Response headers --- array ( 0 => 'X-Powered-By: PHP/8.0.30', 1 => 'X-DNS-Prefetch-Control: on', 2 => 'Set-Cookie: PHPSESSID=ksmhphvr1lho77donlr4371go6; path=/; secure; SameSite=None', 3 => 'Expires: Thu, 19 Nov 1981 08:52:00 GMT', 4 => 'Cache-Control: no-store, no-cache, must-revalidate', 5 => 'Pragma: no-cache', 6 => 'Content-Type: text/html; charset=UTF-8', 7 => 'Link: <https://onlinechartnet.nl/wp-json/>; rel="https://api.w.org/"', 8 => 'Link: <https://onlinechartnet.nl/wp-json/wp/v2/pages/2356>; rel="alternate"; type="application/json"', 9 => 'Link: <https://onlinechartnet.nl/?p=2356>; rel=shortlink', 10 => 'X-LiteSpeed-Cache-Control: public,max-age=604800', 11 => 'X-LiteSpeed-Tag: 35c_HTTP.200,35c_page,35c_URL./website-laten-maken/,35c_Po.2356,35c_PGS,35c_guest,35c_,35c_MIN.9e897568277eee3a0f354de75dca3671.css,35c_MIN.1d670d609054172777fb278500444d18.js', ) 02/18/24 19:13:32.322 [00.00.00.00:60108 1 22v] End response --------------------------------------------------Duration: 4,168.76 ms------------------------------ 02/18/24 19:13:32.985 [00.00.00.00:55108 1 gnT] ?? ------GET HTTP/1.1 (HTTPS) /website-laten-maken/ 02/18/24 19:13:32.985 [00.00.00.00:55108 1 gnT] Query String: 02/18/24 19:13:32.985 [00.00.00.00:55108 1 gnT] HTTP_REFERER: https://onlinechartnet.nl/website-laten-maken/ 02/18/24 19:13:32.985 [00.00.00.00:55108 1 gnT] Cookie _lscache_vary: guest_mode:1 02/18/24 19:13:32.985 [00.00.00.00:55108 1 gnT] LSCACHE_VARY_VALUE: +webp 02/18/24 19:13:33.783 [00.00.00.00:55108 1 gnT] [Router] get_role: 02/18/24 19:13:33.786 [00.00.00.00:55108 1 gnT] ?? Suppress default WP lazyload 02/18/24 19:13:33.791 [00.00.00.00:55108 1 gnT] [Optm] init 02/18/24 19:13:34.105 [00.00.00.00:55108 1 gnT] ?? [Tag] Add --- HTTP.200 02/18/24 19:13:34.105 [00.00.00.00:55108 1 gnT] [Ctrl] X Cache_control init on 02/18/24 19:13:34.198 [00.00.00.00:55108 1 gnT] [Tool] Deregistered frontend heartbeat 02/18/24 19:13:34.775 [00.00.00.00:55108 1 gnT] [Core] Footer hook called 02/18/24 19:13:34.837 [00.00.00.00:55108 1 gnT] [Core] Footer check failed: 3-<footer class="xs-footer-section footer-group" style="background-image: url('https://onlinechartnet. 02/18/24 19:13:34.837 [00.00.00.00:55108 1 gnT] [Router] get_role: 02/18/24 19:13:34.838 [00.00.00.00:55108 1 gnT] [Router] get_role: 02/18/24 19:13:34.838 [https://onlinechartnet.nl:55108 1 gnT] [Vary] role id: failed, guest 02/18/24 19:13:34.838 [00.00.00.00:55108 1 gnT] [Router] get_role: 02/18/24 19:13:34.838 [00.00.00.00:55108 1 gnT] [Router] get_role: 02/18/24 19:13:34.838 [00.00.00.00:55108 1 gnT] ?? X-LiteSpeed-Cache-Control: public,max-age=604800 02/18/24 19:13:34.839 [00.00.00.00:55108 1 gnT] [Router] get_role: 02/18/24 19:13:34.839 [00.00.00.00:55108 1 gnT] [Vary] role id: failed, guest 02/18/24 19:13:34.839 [00.00.00.00:55108 1 gnT] [Router] get_role: 02/18/24 19:13:34.839 [00.00.00.00:55108 1 gnT] [Router] get_role: 02/18/24 19:13:34.839 [00.00.00.00:55108 1 gnT] ?? X-LiteSpeed-Tag: 35c_HTTP.200,35c_page,35c_URL./website-laten-maken/,35c_Po.2356,35c_PGS,35c_ 02/18/24 19:13:34.840 [00.00.00.00:55108 1 gnT] [Core] Footer check passed 02/18/24 19:13:34.840 [00.00.00.00:55108 1 gnT] [Core] run hook litespeed_buffer_finalize 02/18/24 19:13:34.840 [00.00.00.00:55108 1 gnT] ?? finalize 02/18/24 19:13:34.866 [00.00.00.00:55108 1 gnT] ?? ?? Missing sizes for image [src] https://onlinechartnet.nl/wp-content/themes/hostinza/assets/images/flags/006-united-states.svg 02/18/24 19:13:34.866 [00.00.00.00:55108 1 gnT] ?? ?? Missing sizes for image [src] https://onlinechartnet.nl/wp-content/themes/hostinza/assets/images/flags/002-canada.svg 02/18/24 19:13:34.867 [00.00.00.00:55108 1 gnT] ?? ?? Missing sizes for image [src] https://onlinechartnet.nl/wp-content/themes/hostinza/assets/images/flags/003-vietnam.svg 02/18/24 19:13:34.867 [00.00.00.00:55108 1 gnT] ?? ?? Missing sizes for image [src] https://onlinechartnet.nl/wp-content/themes/hostinza/assets/images/flags/004-france.svg 02/18/24 19:13:34.867 [00.00.00.00:55108 1 gnT] ?? ?? Missing sizes for image [src] https://onlinechartnet.nl/wp-content/themes/hostinza/assets/images/flags/005-germany.svg 02/18/24 19:13:34.873 [00.00.00.00:55108 1 gnT] [Optm] start 02/18/24 19:13:34.875 [00.00.00.00:55108 1 gnT] [CCSS] Separate CCSS due to posttype setting: page 02/18/24 19:13:34.875 [00.00.00.00:55108 1 gnT] [Router] get_role: 02/18/24 19:13:34.875 [00.00.00.00:55108 1 gnT] [Vary] role id: failed, guest 02/18/24 19:13:34.875 [00.00.00.00:55108 1 gnT] [Router] get_role: 02/18/24 19:13:34.875 [00.00.00.00:55108 1 gnT] [Router] get_role: 02/18/24 19:13:36.273 [00.00.00.00:55108 1 gnT] [Optm] js defer exclude https://onlinechartnet.nl/wp-includes/js/jquery/jquery.min.js?ver=3.7.1
the log looks incomplete and weird at some sense
anyway , please create a ticket by mail to
support at litespeedtech.com
with reference link to this topic , we will investigate further.
- The topic ‘Excluding images from lazy loading’ is closed to new replies.