diff --git a/themes/thomasba/layouts/shortcodes/gallery.html b/themes/thomasba/layouts/shortcodes/gallery.html index de20248..d0fa787 100644 --- a/themes/thomasba/layouts/shortcodes/gallery.html +++ b/themes/thomasba/layouts/shortcodes/gallery.html @@ -20,14 +20,14 @@ Documentation and licence at https://github.com/liwenyip/hugo-easy-gallery/ {{- if and $isimg (and (not $isthumb) (not $islarge)) }} {{- $caption := .Name | replaceRE "\\..*" "" | humanize }} {{- $linkURL := print $baseURL ($.Get "dir") "/" .Name | absURL }} - {{- $thumb := .Name | replaceRE "(\\.)" ($thumbext | printf "%s.") }} + {{- $thumb := .Name | replaceRE "(\\.)(gif|jpg|jpeg|tiff|png|bmp)$" ($thumbext | printf "%s.$2") }} {{- $thumbexists := where $files "Name" $thumb }} {{- $thumbURL := print $baseURL ($.Get "dir") "/" $thumb | absURL }} {{- $large := .Name | replaceRE "(\\.)" ($largeext | printf "%s.") }} {{- $largeexists := where $files "Name" $large }} {{- $largeURL := print $baseURL ($.Get "dir") "/" $large | absURL }}