mirror of
https://github.com/gcushen/hugo-academic.git
synced 2025-07-26 03:00:50 +02:00
feat: support animated GIF in figures
Workaround Hugo converting animated gifs to static gifs: https://github.com/gohugoio/hugo/issues/5030
This commit is contained in:
parent
bbca6dea78
commit
3ea78d2c66
1 changed files with 2 additions and 1 deletions
|
@ -27,7 +27,8 @@
|
|||
<div class="w-100" {{ with .Get "max_width" }}style="max-width: {{.}}"{{end}}>
|
||||
{{- if $img -}}
|
||||
{{ $isSVG := eq $img.MediaType.SubType "svg" }}
|
||||
{{ if $isSVG -}}
|
||||
{{ $isGIF := eq $img.MediaType.SubType "gif" }}
|
||||
{{ if $isSVG | or $isGIF -}}
|
||||
<img alt="{{ $alt }}"
|
||||
src="{{ $img.RelPermalink }}"
|
||||
loading="lazy"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue