Reduce size of images on list page
It maxes out at ~220 anyway, and 200 is how large the unsplash images are anyway
This commit is contained in:
parent
68ef4341a0
commit
73bea50756
1 changed files with 1 additions and 1 deletions
|
@ -5,7 +5,7 @@
|
||||||
{{ .Scratch.Set "image" .Params.image }}
|
{{ .Scratch.Set "image" .Params.image }}
|
||||||
{{ if hasPrefix .Params.image "resource:" }}
|
{{ if hasPrefix .Params.image "resource:" }}
|
||||||
{{ $resource := .Resources.GetMatch (replace .Params.image "resource:" "") }}
|
{{ $resource := .Resources.GetMatch (replace .Params.image "resource:" "") }}
|
||||||
{{ .Scratch.Set "image" ($resource.Resize "500x webp").RelPermalink }}
|
{{ .Scratch.Set "image" ($resource.Resize "200x webp").RelPermalink }}
|
||||||
{{ else if hasPrefix .Params.image "unsplash:" }}
|
{{ else if hasPrefix .Params.image "unsplash:" }}
|
||||||
{{ $unsplash_id := replace .Params.image "unsplash:" "" }}
|
{{ $unsplash_id := replace .Params.image "unsplash:" "" }}
|
||||||
{{ $query := querify "client_id" (getenv "UNSPLASH_ACCESS_KEY") }}
|
{{ $query := querify "client_id" (getenv "UNSPLASH_ACCESS_KEY") }}
|
||||||
|
|
Loading…
Reference in a new issue