Skip to content

Commit ba7dd06

Browse files
committed
use smaller image sizes for people
1 parent 801d3d4 commit ba7dd06

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

themes/openrail/layouts/shortcodes/people/person.html

+6-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
11
{{ $data := (index .Site.Data.people .Params.id) -}}
22
<section class="person" id="{{ .Params.id }}">
3-
<img src="/images/people/{{ with $data.img }}{{ . }}{{ else }}default.jpg{{ end }}" alt="Picture of {{ $data.name }}">
3+
{{- $img := "images/people/default.jpg" }}
4+
{{- with $data.img }}
5+
{{- $img = path.Join "images/people" . }}
6+
{{- end }}
7+
{{- $img_resized := (resources.Get $img).Fill "300x300 Center" }}
8+
<img src="{{ $img_resized.RelPermalink }}" alt="Picture of {{ $data.name }}">
49
<h5>{{ $data.name }}</h5>
510
{{ with $data.openrail_role -}}
611
<p><em>{{ . }}</em></p>

0 commit comments

Comments
 (0)