burugaria7 / myblog

My Web Page deployed by hugo on netlify from 2021.5
https://retasu-blog.netlify.app/
0 stars 0 forks source link

Image Compression #4

Open burugaria7 opened 2 years ago

burugaria7 commented 2 years ago

Uploaded images need to be replaced with compressed ones to speed up page loading.

abitsalihu commented 2 years ago

@burugaria7 what if you add lazy loading, so that the big file image will show only after the page has rendered?

burugaria7 commented 2 years ago

@abitsalihu From looking at the source code, it appears that the lazy option is enabled in the render. It seems to be a good idea to simply compress the uploaded images using a compression service. Thanks for the advice. https://github.com/burugaria7/myblog/blob/033a6abeb1eacabb5a3cdc9f70a32b96722f59c7/themes/casper-two/layouts/_default/_markup/render-image.html#L1-L6