# Lazy loading affects the behavior of offcanvas

**URL:** https://forum.pinegrow.com/t/lazy-loading-affects-the-behavior-of-offcanvas/8176
**Category:** Support Forum Feedback
**Created:** [June 26, 2023, 3:16pm UTC](https://forum.pinegrow.com/t/lazy-loading-affects-the-behavior-of-offcanvas/8176 "2023-06-26T15:16:51Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![Josan](https://avatars.discourse-cdn.com/v4/letter/j/dec6dc/32.png) [@Josan](https://forum.pinegrow.com/u/Josan)
#### Post date: [June 26, 2023, 3:16pm UTC](https://forum.pinegrow.com/t/lazy-loading-affects-the-behavior-of-offcanvas/8176/1 "2023-06-26T15:16:51Z")

</div>

Hi. My english is very limited, sorry.  
When I activate Lazy loading, the links that I have inside an offcanvas lose the accuracy of the displacement. It is a one page website. This is the second time this has happened to me (two out of two). I copy the offcanvas code from [getbootstrap.com](http://getbootstrap.com) and enable Lazy loading in Pinegrow.  
Si desactivo lazy loading todo vuelve a funcionar.  
Any ideas?

---

<div class="post-metadata">

### Author: ![PeteSharp](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.pinegrow.com/petesharp/32/7073_2.png) [@PeteSharp](https://forum.pinegrow.com/u/PeteSharp)
#### Post date: [June 26, 2023, 9:22pm UTC](https://forum.pinegrow.com/t/lazy-loading-affects-the-behavior-of-offcanvas/8176/2 "2023-06-26T21:22:24Z")

</div>

There are several methods you can use to prevent reflow…

1. Disable lazy load on the offcanvas images.
2. Using image width and height attributes, the browser will reserve the space (although not responsive)
3. Wrap the images in a div that preserves the aspect ratio / size of the image (responsive)

---

<div class="post-metadata">

### Author: ![Josan](https://avatars.discourse-cdn.com/v4/letter/j/dec6dc/32.png) [@Josan](https://forum.pinegrow.com/u/Josan)
#### Post date: [June 26, 2023, 9:42pm UTC](https://forum.pinegrow.com/t/lazy-loading-affects-the-behavior-of-offcanvas/8176/3 "2023-06-26T21:42:35Z")

</div>

Thanks for the quick reply. I apologize for my bad English and not knowing how to explain the problem better.

I don’t have images inside the offcanvas. Within the offcanvas I only have links to navigate along the page. Everything works fine until I enable lazy loading (LL) on one or more images. With LL disabled, the link takes me to the section I want, but when I activate LL, the first click doesn’t take me where I want; from the second click it starts working.

---

<div class="post-metadata">

### Author: ![PeteSharp](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.pinegrow.com/petesharp/32/7073_2.png) [@PeteSharp](https://forum.pinegrow.com/u/PeteSharp)
#### Post date: [June 26, 2023, 9:47pm UTC](https://forum.pinegrow.com/t/lazy-loading-affects-the-behavior-of-offcanvas/8176/4 "2023-06-26T21:47:40Z")

</div>

Exactly same principle though, As I understand it, the reflow happens if the browser doesn’t know the size of the image, that hasn’t loaded yet.

When the image loads, it shifts the content.
