To edit in Wordpress, edit /htdocs/index.php
Eh, just saw this post…
It is very easy to lazy-load images in pure html. You just add an extra attribute loading=“lazy” to your image element.
There is a nice description here https://www.w3schools.com/tags/att_img_loading.asp
It’s always smarter to keep your code as simple as possible…
Here is some better documentation.
In full agreement!
Its not supported in safari
I just use the loading=“lazy”
attribute on a regular img.
sucks to be safari then
but seriously thanks for this, i didnt know about the loading attribute
BTW for people who want a lightweight and simple plugin for WordPress for this. It is Lazy Loading by WP Rocket: https://en-ca.wordpress.org/plugins/rocket-lazy-load/. If you also want image compression: Smush is good but a bit heavier
Hi @robertz yes you are right both are the great tools but for image compression I think https://jpegcompressor.com/ is also such a good tool don’t you think that.
genuis xD
I thought jpg was already compressed ?
what does jpegcompressor actually do just re-save the image with a lower quality ?