diff --git a/templates/page.html b/templates/page.html
index 5539f5c..508e8dd 100644
--- a/templates/page.html
+++ b/templates/page.html
@@ -10,6 +10,95 @@
+
+
diff --git a/templates/shortcodes/figure.html b/templates/shortcodes/figure.html
index 7db42f1..1427468 100644
--- a/templates/shortcodes/figure.html
+++ b/templates/shortcodes/figure.html
@@ -1,48 +1,50 @@
+{% set avif_src = src |
+replace(from=".jpg",to=".avif") |
+replace(from=".png",to=".avif") %}
+
{% set orig_thumb = src %}
{% if thumb %}
{% set orig_thumb = src |
replace(from=".jpg",to=thumb~".jpg") |
replace(from=".png",to=thumb~".png") %}
{% endif %}
-{% set webp_thumb = thumb |
-replace(from=".jpg",to=".webp") |
-replace(from=".png",to=".webp") %}
-{% set avif_thumb = webp_thumb |
-replace(from=".webp",to=".avif") %}
+{% set avif_thumb = orig_thumb |
+replace(from=".jpg",to=".avif") |
+replace(from=".png",to=".avif") %}
{% set src_url = get_url(path=src) %}
+{% set avif_url = get_url(path=avif_src) %}
+
{% set thumb_url = get_url(path=orig_thumb) %}
-{% set webp_url = get_url(path=webp_thumb) %}
-{% set avif_url = get_url(path=avif_thumb) %}
+{% set avif_thumb_url = get_url(path=avif_thumb) %}
{% set img_data = get_image_metadata(path=src) %}
+{% set avif_data = true %}
+
{% set thumb_data = get_image_metadata(path=orig_thumb) %}
-{% set avif_data = get_image_metadata(path=avif_thumb,allow_missing=true) %}
-{% set webp_data = get_image_metadata(path=webp_thumb,allow_missing=true) %}
+{% set avif_thumb_data = true %}
-
-
- {% if avif_data %}
-
- {% endif %}
- {% if webp_data %}
-
- {% endif %}
-
-
-
-
+
+ {% if avif_thumb_data %}
+
+ {% endif %}
+
+
+
+
{% if caption %}
{{ caption | markdown | safe }}