diff options
Diffstat (limited to 'layouts/_default/_markup/render-image.html')
| -rw-r--r-- | layouts/_default/_markup/render-image.html | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/layouts/_default/_markup/render-image.html b/layouts/_default/_markup/render-image.html index 1aa9839..0fc039c 100644 --- a/layouts/_default/_markup/render-image.html +++ b/layouts/_default/_markup/render-image.html @@ -5,7 +5,16 @@ {{- end -}} {{- if $img -}} - <img loading="lazy" src="{{ $img.RelPermalink }}" alt="{{ $.Text }}" {{ with $.Title}} title="{{ . }}" {{ end }} /> + {{- if eq $img.MediaType.MainType "video" -}} + <figure> + <video class="video-shortcode" preload="metadata" controls> + <source src="{{ $img.RelPermalink }}"> + There should have been a video here but your browser does not seem to support it. + </video> + </figure> + {{- else -}} + <img loading="lazy" src="{{ $img.RelPermalink }}" type="" alt="{{ $.Text }}" {{ with $.Title}} title="{{ . }}" {{ end }} /> + {{- end -}} {{- else -}} {{- warnf "No image found for %s from %s" .Destination .Page.File }} {{- end -}} |
