diff --git a/layouts/shortcodes/figure.html b/layouts/shortcodes/figure.html
index 66e9bd4..398ac9e 100644
--- a/layouts/shortcodes/figure.html
+++ b/layouts/shortcodes/figure.html
@@ -14,7 +14,7 @@
-{{- if not ( in ( slice "image" "video" ) $src.ResourceType ) -}}
+{{- if not ( in ( slice "audio" "image" "video" ) $src.ResourceType ) -}}
{{- errorf "Resource '%q' resource type '%q' is not valid (%q)" ( .Get "src" ) $src.ResourceType .Page.File.Path -}}
{{- end -}}
@@ -42,15 +42,12 @@
{{- if eq $src.ResourceType "image" -}}
{{- partial "media/picture.html" $src -}}
- {{- else if eq $src.ResourceType "video" -}}
- {{- if eq $src.MediaType "video/ogg" -}}
+ {{- else if eq $src.ResourceType "audio" -}}
{{- partial "media/audio.html" $src -}}
- {{- else -}}
+ {{- else if eq $src.ResourceType "video" -}}
{{- partial "media/video.html" ( dict "src" $src "page_file_path" .Page.File.Path ) -}}
- {{- end -}}
-
{{- else if ( or ( ne $src.ResourceType "image" ) ( ne $src.ResourceType "video" ) ) -}}
{{- errorf "No handling for resource of type %q" $src.ResourceType -}}
{{- end -}}