images 500px par defaut
This commit is contained in:
parent
e8db935193
commit
984f2e9ba3
1 changed files with 1 additions and 1 deletions
|
@ -9,7 +9,7 @@ Documentation and licence at https://github.com/liwenyip/hugo-easy-gallery/
|
||||||
<!-- use either src or link-thumb for thumbnail image -->
|
<!-- use either src or link-thumb for thumbnail image -->
|
||||||
{{- $thumb := .Get "src" | default (printf "%s." (.Get "thumb") | replace (.Get "link") ".") }}
|
{{- $thumb := .Get "src" | default (printf "%s." (.Get "thumb") | replace (.Get "link") ".") }}
|
||||||
{{- $thumbResource := $.Page.Resources.GetMatch $thumb }}
|
{{- $thumbResource := $.Page.Resources.GetMatch $thumb }}
|
||||||
{{- $fitSize := .Get "size" | default "400" }}
|
{{- $fitSize := .Get "size" | default "500" }}
|
||||||
{{- if $thumbResource }}
|
{{- if $thumbResource }}
|
||||||
{{- $thumbResource = $thumbResource.Fit (printf "%[1]sx%[1]s webp q85" $fitSize) -}}
|
{{- $thumbResource = $thumbResource.Fit (printf "%[1]sx%[1]s webp q85" $fitSize) -}}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue