Optimisation des images
This commit is contained in:
|
Before Width: | Height: | Size: 790 KiB After Width: | Height: | Size: 790 KiB |
|
Before Width: | Height: | Size: 7.5 MiB After Width: | Height: | Size: 7.5 MiB |
@@ -3,14 +3,10 @@
|
||||
<div class="panel oeuvre-panel">
|
||||
<div class="oeuvre-panel__image">
|
||||
{{- $assetPath := "images/oeuvres/l-anankeisme.png" -}}
|
||||
{{- with resources.Get $assetPath -}}
|
||||
{{- $img := .Resize "320x" -}}
|
||||
{{- $source := resources.Get $assetPath -}}
|
||||
{{- $img := $source.Resize "320x" -}}
|
||||
<img src='{{ $img.RelPermalink }}' width="{{ $img.Width }}" height="{{ $img.Height }}"
|
||||
alt="Couverture de L'Anankéisme – Essai philosophique sur le déterminisme intégral" loading="lazy">
|
||||
{{- else -}}
|
||||
<img src='{{ "/images/oeuvres/l-anankeisme.png" | relURL }}'
|
||||
alt="Couverture de L'Anankéisme – Essai philosophique sur le déterminisme intégral" loading="lazy">
|
||||
{{- end }}
|
||||
</div>
|
||||
<div class="oeuvre-panel__content">
|
||||
<h2>L'Anankéisme</h2>
|
||||
@@ -30,4 +26,4 @@
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</aside>
|
||||
</aside>
|
||||
|
||||
@@ -3,14 +3,10 @@
|
||||
<div class="panel oeuvre-panel">
|
||||
<div class="oeuvre-panel__image">
|
||||
{{- $assetPath := "images/oeuvres/l-humain-cette-espece-primitive.jpeg" -}}
|
||||
{{- with resources.Get $assetPath -}}
|
||||
{{- $img := .Resize "320x" -}}
|
||||
{{- $source := resources.Get $assetPath -}}
|
||||
{{- $img := $source.Resize "320x" -}}
|
||||
<img src='{{ $img.RelPermalink }}' width="{{ $img.Width }}" height="{{ $img.Height }}"
|
||||
alt="Couverture de L'Humain, cette espèce primitive" loading="lazy">
|
||||
{{- else -}}
|
||||
<img src='{{ "/images/oeuvres/l-humain-cette-espece-primitive.jpeg" | relURL }}'
|
||||
alt="Couverture de L'Humain, cette espèce primitive" loading="lazy">
|
||||
{{- end }}
|
||||
</div>
|
||||
<div class="oeuvre-panel__content">
|
||||
<h2>L'Humain, cette espèce primitive</h2>
|
||||
@@ -29,4 +25,4 @@
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</aside>
|
||||
</aside>
|
||||
|
||||
Reference in New Issue
Block a user