Archived topic
Lazy Load plugin messing with internal links
5 replies · Started by Matt on July 12, 2019
Hiya,
I've discovered the 'Lazy Load by WP Rocket' plugin is messing with the accuracy of internal links using the smooth-scroll class.
You can see an example at https://heretotravel.com/aarhus/. Scroll down a bit and click a link in the 'At A Glance' section and you should find it sends you to a random spot in the post.
Do you have any suggestions as to how to fix this?
Many thanks.
Hi there,
you may be able to fix that by changing the lazyload threshold with the filter php snippet they provide here:
https://docs.wp-rocket.me/article/1032-adjust-lazyload-threshold
By having the images load quicker on scroll may mitigate the problem you're having.
Hi David,
That's an awesome suggestion. Regretfully however, it didn't work. :o/
Yeah - it was a shot in the dark lol
I am not sure how this can be resolved. The Content Reflow occurs because the image placeholders have no explicit height when the link is clicked.
Might be worth asking WP Rocket whether they have a workaround - although i couldn't see any mention of it on there documentation.
Hi David,
No worries. I'll do some digging around. Thanks for your help.
Matt
Be good to hear what you find - i did find this article a while back, at the very least it gives some insight to the issue:
https://css-tricks.com/preventing-content-reflow-from-lazy-loaded-images/