Poster2 {{header.image.src}} avif

{{header.image.src}} with an avif file?

Could you be more precise? Did you test and failed?

yes, fail, read fallback in webp or jpg (from an image plus source).

if I don’t put the fallback image, I see an empty picture.

image plus source displays the avif perfectly, the problem arises with {{header.image.src}}

I am reading the src attribute from an img tag. So, no, it won’t work.

any solution to put in a coder source to make it work?


Thank you

As workaround, you could try to put the link to the avif into the preview image input field, or custom metadata.

  • custom.metadata
  • preview_image.src

it’s a bit too cumbersome like this, thanks anyway

preview_image.src works, but I don’t want to create complications in a future update, or in the case of a browser that doesn’t support avif I don’t know how the fall back behaves.

For now the simplest way is to leave {{header.image.src}} and insert in the Header Content section an ImageFit or Image(Source) or markdown with remote link of the avif image, if the browser supports it ok, otherwise it is displayed empty.