Remove metadata check to support avif and reduce CLS

This commit is contained in:
blaine-t 2024-09-09 22:38:22 -05:00
parent 7e0f022c92
commit b5d84f5435
No known key found for this signature in database
GPG key ID: 8D281DF6BDB25B4A
3 changed files with 3 additions and 7 deletions

View file

@ -4,11 +4,9 @@
{%- else -%}
{%- set colocated_path = page.colocated_path | default(value="") -%}
{%- set relative_path = colocated_path ~ src -%}
{%- set meta = get_image_metadata(path=relative_path, allow_missing=true) -%}
{#- Fallback to absolute path if relative path doesn't work -#}
{%- if not meta -%}
{%- set meta = get_image_metadata(path=src, allow_missing=true) -%}
{%- set image_url = get_url(path=src) -%}
{%- else -%}
{%- set image_url = get_url(path=relative_path) -%}