diff --git a/README.md b/README.md
index 21538e5..9d347d3 100644
--- a/README.md
+++ b/README.md
@@ -47,6 +47,7 @@ All parameters:
- `src`: Must contain either a comma-separated list of paths to images, or a directory path containing images.
- `lightbox`: Whether a click on an image shall open a lightbox modal. Default: `true`.
+- `aspectratio`: Define the aspect ratio of the images in the slideshow/gallery. Default: `16/10`.
- `mode`: Can be either `gallery` or `slideshow`. Default: `gallery`.
- For gallery mode:
- `columns`: Amount of columns the images are displayed in. Default: `4`.
diff --git a/assets/scss/snap-gallery.scss b/assets/scss/snap-gallery.scss
index 53e0d39..da5a148 100644
--- a/assets/scss/snap-gallery.scss
+++ b/assets/scss/snap-gallery.scss
@@ -17,7 +17,7 @@ $gap: var(--gap);
min-width: var(--min-width);
img {
- aspect-ratio: 16/10;
+ aspect-ratio: var(--aspectratio);
width: 100%;
object-fit: cover;
}
diff --git a/layouts/partials/gallery.html b/layouts/partials/gallery.html
index 1ea1e76..85b03c9 100644
--- a/layouts/partials/gallery.html
+++ b/layouts/partials/gallery.html
@@ -1,6 +1,6 @@
{{- $imgs := .imgs -}}
{{- $galno := .galno -}}
-
+
{{- range $i, $img := $imgs -}}

diff --git a/layouts/partials/slideshow.html b/layouts/partials/slideshow.html
index 648e42d..ce3798f 100644
--- a/layouts/partials/slideshow.html
+++ b/layouts/partials/slideshow.html
@@ -1,6 +1,6 @@
{{- $imgs := .imgs -}}
{{- $galno := .galno -}}
-
+
{{- range $i, $img := $imgs }}
{{ add $i 1 }} / {{ len $imgs }}
diff --git a/layouts/shortcodes/snap-gallery.html b/layouts/shortcodes/snap-gallery.html
index eed4342..871bd98 100644
--- a/layouts/shortcodes/snap-gallery.html
+++ b/layouts/shortcodes/snap-gallery.html
@@ -52,12 +52,12 @@
{{- $mode := default "gallery" .Params.mode -}}
{{/* Gallery mode */}}
{{- if eq $mode "gallery" -}}
-{{- partial "gallery" (dict "columns" .Params.columns "minwidth" .Params.minwidth "imgs" $imgs "galno" $galno "cursor" $cursor) -}}
+{{- partial "gallery" (dict "columns" .Params.columns "minwidth" .Params.minwidth "imgs" $imgs "galno" $galno "cursor" $cursor "aspectratio" .Params.aspectratio) -}}
{{/* Slideshow mode */}}
{{- else if eq $mode "slideshow" -}}
-{{- partial "slideshow" (dict "imgs" $imgs "galno" $galno "width" .Params.slideshowwidth "cursor" $cursor) -}}
+{{- partial "slideshow" (dict "imgs" $imgs "galno" $galno "width" .Params.slideshowwidth "cursor" $cursor "aspectratio" .Params.aspectratio) -}}
{{/* Set autorotate timer for slideshow, if configured (default: yes) */}}
-{{- if .Params.slideshowrotate -}}
+{{- if (default true .Params.slideshowrotate) -}}
{{- end -}}
{{- end -}}