Lazy loading ensures that components are only loaded when they are in the visible area of the browser.
This makes your page load faster, providing a better experience for visitors.
Good to know
We do not offer services, advice or support for your own code.
If you have technical difficulties with your website, remove your own code to check whether this is the problem.
Enable lazy loading for iframes
How to enable lazy loading for embedded iframes:
- Embed an iframe.
- Edit the code.
- Add the class
lazyload
. - Replace
src
withdata-src
. -
Example:
<iframe data-src="https://..." class="lazyload"></iframe>
- Add the class
- Click on Save.
- You can click on Preview in the header bar to see a preview of the changes in a new tab.
- Click on Save in the header bar.
Enable lazy loading for embedded images
How to enable lazy loading for embedded images:
- Edit the code.
- Add the class
lazyload
. - Replace
src
withdata-src
. - Set
data-original-width
anddata-original-height
with the original size of the image. -
Example:
<img data-src="https://..." class="lazyload" data-original-width="2048" data-original-height="2048" />
- Click on Save.
- You can click on Preview in the header bar to see a preview of the changes in a new tab.
- Click on Save in the header bar.