File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 117117 if the EXIF informations contains an orientation value. See issue #22. */}}
118118 {{ $rotated := $original.Filter images.AutoOrient }}
119119
120- {{/* Create thumbnail, rotate it if needed */}}
121- {{ $thumbnail := ($rotated.Fit $thumbnailResizeOptions) }}
122-
123-
124120 < div >
125121 {{ $full := "" }}
126122 {{ if $imageResizeOptions }}
130126 {{/* No need to use the rotated here, the browser will handle care of EXIF orientation */}}
131127 {{ $full = $original }}
132128 {{ end }}
129+
130+ {{ $thumbnail := "" }}
131+ {{ if eq $thumbnailResizeOptions "original" }}
132+ {{/* If thumbnailResizeOptions is set to 'original', use the original (unmodified) image for the thumbnail */}}
133+ {{ $thumbnail = $original }}
134+ {{ else if eq $thumbnailResizeOptions "full" }}
135+ {{/* If thumbnailResizeOptions is set to 'full', use the same image as the lightbox for the thumbnail */}}
136+ {{ $thumbnail = $full }}
137+ {{ else }}
138+ {{/* Create thumbnail, rotate it if needed */}}
139+ {{ $thumbnail = ($rotated.Fit $thumbnailResizeOptions) }}
140+ {{ end }}
141+
133142 < a href ="{{ $full.RelPermalink }} "
134143 class ="galleryImg "
135144 {{ with $metadata }}
You can’t perform that action at this time.
0 commit comments