The lightgallery resource is large, so need to optimize loading speed.
It is very difficult to determine whether there is an image in the summary of the homepage on the render.
But It is easy to determine whether there is an image on the article page.
There are many pits about ScracthStore and render cache on the Hugo server. https://discourse.gohugo.io/t/strange-behavior-with-scratch-variable/52288/11?u=xiao_qing
So The best method is to load it on demand from the front end.
Describe the feature you want 描述你的功能需求
The lightgallery resource is large, so need to optimize loading speed. It is very difficult to determine whether there is an image in the summary of the homepage on the render. But It is easy to determine whether there is an image on the article page. There are many pits about
Scracth
Store
and render cache on the Hugo server. https://discourse.gohugo.io/t/strange-behavior-with-scratch-variable/52288/11?u=xiao_qingSo The best method is to load it on demand from the front end.
Useful reference 有价值的参考
No response