Use smaller images for post headers
1080 wide should be ample, and the file size reduces massively
This commit is contained in:
parent
5d56ca8ad2
commit
8644beba1a
1 changed files with 1 additions and 1 deletions
|
@ -7,7 +7,7 @@
|
||||||
{{ $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") }}
|
||||||
{{ $unsplash_data := (getJSON "https://api.unsplash.com/photos/" $unsplash_id "?" $query )}}
|
{{ $unsplash_data := (getJSON "https://api.unsplash.com/photos/" $unsplash_id "?" $query )}}
|
||||||
{{ .Scratch.Set "image" $unsplash_data.urls.full }}
|
{{ .Scratch.Set "image" $unsplash_data.urls.regular }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
||||||
<img class="mb-3 header-image" src='{{ .Scratch.Get "image" }}' alt="" />
|
<img class="mb-3 header-image" src='{{ .Scratch.Get "image" }}' alt="" />
|
||||||
|
|
Loading…
Reference in a new issue