diff --git a/templates/macro/content-thumb.html b/templates/macro/content-thumb.html
index 6f8bf394..fa61d398 100644
--- a/templates/macro/content-thumb.html
+++ b/templates/macro/content-thumb.html
@@ -81,6 +81,13 @@
class="lazyload"
th:src="${#theme.assets('/images/load/orange.progress-bar-stripe-loader.svg')}"
th:data-src="${post.spec.cover}"
+ th:data-srcset="|
+ ${thumbnail.gen(post.spec.cover, 's')} 400w,
+ ${thumbnail.gen(post.spec.cover, 'm')} 800w,
+ ${thumbnail.gen(post.spec.cover, 'l')} 1200w,
+ ${thumbnail.gen(post.spec.cover, 'xl')} 1600w
+ |"
+ data-sizes="auto"
alt="thumbnail of the cover of the post"
width="430"
height="300"
diff --git a/templates/macro/page-header.html b/templates/macro/page-header.html
index 7a444d17..982b04b2 100644
--- a/templates/macro/page-header.html
+++ b/templates/macro/page-header.html
@@ -20,8 +20,15 @@
class="lazyload"
th:src="${#theme.assets('/images/load/orange.progress-bar-stripe-loader.svg')}"
th:data-src="${postCursor.next.spec.cover}"
+ th:data-srcset="|
+ ${thumbnail.gen(postCursor.next.spec.cover, 's')} 400w,
+ ${thumbnail.gen(postCursor.next.spec.cover, 'm')} 800w,
+ ${thumbnail.gen(postCursor.next.spec.cover, 'l')} 1200w,
+ ${thumbnail.gen(postCursor.next.spec.cover, 'xl')} 1600w
+ |"
+ data-sizes="auto"
alt="The cover picture of the next content"
height="160"
width="390"
@@ -78,12 +92,12 @@
th:with="randomUrl = |${theme.config.random_image.rimage_url}?${_templateId}id=${postCursor.next.metadata.name}&${theme.config.random_image.rimage_custom_param_name}=${postCursor.next.metadata.name}&type=url&itype=${theme.config.random_image.rimage_cover_itype}${theme.config.random_image.rimage_cover_itype != 'image' ? '&id=' + theme.config.random_image.rimage_cover_id : ''}${#strings.isEmpty(theme.config.random_image.rimage_other_params) ? '' : '&' + theme.config.random_image.rimage_other_params}|"
th:src="${theme.config.random_image.rimage_cover_lqip == 'loading' ? #theme.assets('/images/load/orange.progress-bar-stripe-loader.svg') : (randomUrl + (#strings.isEmpty(theme.config.random_image.rimage_cover_lqip_params) ? '' : '&' + theme.config.random_image.rimage_cover_lqip_params))}"
th:data-srcset="|
- ${randomUrl}&th=400 400w,
- ${randomUrl}&th=960 960w,
- ${randomUrl}&th=1280 1280w,
- ${randomUrl}&th=1440 1440w,
- ${randomUrl}&th=1920 1920w
- |"
+ ${randomUrl}&th=400 400w,
+ ${randomUrl}&th=960 960w,
+ ${randomUrl}&th=1280 1280w,
+ ${randomUrl}&th=1440 1440w,
+ ${randomUrl}&th=1920 1920w
+ |"
data-sizes="auto"
class="lazyload"
th:classappend="${theme.config.random_image.rimage_cover_lqip == 'lowquality' ? 'blur-up' : ''}"
diff --git a/templates/moment.html b/templates/moment.html
index 3f1b018c..2cfe2e23 100644
--- a/templates/moment.html
+++ b/templates/moment.html
@@ -17,7 +17,7 @@
-
+
th:if="${momentItem.type.name == 'PHOTO'}"
th:src="${#strings.isEmpty(momentItem.url) ? #theme.assets('/images/load/load.gif') : momentItem.url}"
th:data-src="${momentItem.url}"
+ th:data-srcset="|
+ ${thumbnail.gen(momentItem.url, 's')} 400w,
+ ${thumbnail.gen(momentItem.url, 'm')} 800w,
+ ${thumbnail.gen(momentItem.url, 'l')} 1200w,
+ ${thumbnail.gen(momentItem.url, 'xl')} 1600w
+ |"
+ data-sizes="auto"
width="400"
height="400"
alt="moment picture"
diff --git a/templates/moments.html b/templates/moments.html
index 9c818a44..90423c4e 100644
--- a/templates/moments.html
+++ b/templates/moments.html
@@ -21,107 +21,7 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
diff --git a/theme.yaml b/theme.yaml
index 681c41d1..b53fa8cb 100644
--- a/theme.yaml
+++ b/theme.yaml
@@ -18,6 +18,6 @@ spec:
settingName: theme-sakura-setting
configMapName: theme-sakura-configMap
version: 2.4.0
- require: ">=2.17.0"
+ require: ">=2.19.0"
metadata:
name: theme-sakura