diff --git a/assets/scss/partials/article.scss b/assets/scss/partials/article.scss
index 94c0177..2388ba8 100644
--- a/assets/scss/partials/article.scss
+++ b/assets/scss/partials/article.scss
@@ -207,8 +207,8 @@
border-radius: var(--card-border-radius);
overflow: hidden;
position: relative;
- height: 350px;
width: 250px;
+ height: 150px;
box-shadow: var(--shadow-l1);
transition: box-shadow 0.3s ease;
background-color: var(--card-background);
diff --git a/assets/scss/partials/layout/article.scss b/assets/scss/partials/layout/article.scss
index b214a10..af038ad 100644
--- a/assets/scss/partials/layout/article.scss
+++ b/assets/scss/partials/layout/article.scss
@@ -242,8 +242,6 @@
margin-right: 15px;
flex-shrink: 0;
overflow: hidden;
- width: 250px;
- height: 150px;
.article-title {
font-size: 1.8rem;
diff --git a/assets/scss/partials/layout/list.scss b/assets/scss/partials/layout/list.scss
index b97e1d2..b29f230 100644
--- a/assets/scss/partials/layout/list.scss
+++ b/assets/scss/partials/layout/list.scss
@@ -56,8 +56,6 @@
width: max-content;
article {
- width: 250px;
- height: 150px;
margin-right: 20px;
flex-shrink: 0;
diff --git a/config/_default/params.toml b/config/_default/params.toml
index 2583f61..f1baee3 100644
--- a/config/_default/params.toml
+++ b/config/_default/params.toml
@@ -75,11 +75,13 @@ SortBy = "default"
toggle = true
default = "auto"
-[imageProcessing.cover]
- enabled = true
+[imageProcessing]
+ [imageProcessing.content]
+ widths = [800, 1600, 2400]
+ enabled = true
-[imageProcessing.content]
- enabled = true
+ [imageProcessing.thumbnail]
+ enabled = true
# GDPR Cookie Consent Configuration
# When enabled, analytics and functional cookies require user consent
diff --git a/layouts/_markup/render-image.html b/layouts/_markup/render-image.html
index f15d292..2d0ebc9 100644
--- a/layouts/_markup/render-image.html
+++ b/layouts/_markup/render-image.html
@@ -2,23 +2,29 @@
{{- $alt := .PlainText | safeHTML -}}
{{- $title := .Title | markdownify -}}
-{{/* SVG and external images won't work with gallery layout, because their width and height attributes are unknown */}}
+{{/* There are some types of images that don't have width and height attributes, such as SVG */}}
{{- $galleryImage := and $image.Height $image.Width -}}
-
\ No newline at end of file
+{{- $attributes := dict -}}
+{{- if $galleryImage -}}
+ {{- $attributes = (dict
+ "data-flex-grow" (div (mul $image.Width 100) $image.Height)
+ "data-flex-basis" (printf "%dpx" (div (mul $image.Width 240) $image.Height))
+ ) -}}
+{{- end -}}
+
+{{ partial "helper/responsive-image" (dict
+ "Resource" $image.Resource
+ "Widths" (cond .Page.Site.Params.ImageProcessing.Content.Enabled .Page.Site.Params.ImageProcessing.Content.Widths nil)
+ "Attributes" (merge $attributes (dict
+ "src" $image.Permalink
+ "width" $image.Width
+ "height" $image.Height
+ "alt" $alt
+ "title" $title
+ "data-title-escaped" ($title | htmlEscape)
+ "class" (cond $galleryImage "gallery-image" "")
+ "loading" "lazy"
+ "sizes" "(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px"
+ ))
+) }}
\ No newline at end of file
diff --git a/layouts/_partials/article-list/compact.html b/layouts/_partials/article-list/compact.html
index 7a4185c..f110e90 100644
--- a/layouts/_partials/article-list/compact.html
+++ b/layouts/_partials/article-list/compact.html
@@ -14,8 +14,19 @@
{{- $image := partial "helper/image" (dict "Image" .Params.image "Resources" .Resources) -}}
{{ if $image }}