Explain the problem.
When I try to set fetchpriority on an image like so, it doesn't get recognized as an attribute and instead gets passed through as data-fetchpriority. While fetchpriority is a newer attribute, it is an official one (or at least listed on MDN which is about as good as you get).
[{.hero fetchpriority=high}]
Yields:
<img src="/image.jpg" class="hero" data-fetchpriority="high" alt="a lovely image">
Pandoc version?
Pandoc 3.8 on macOS, bundled by Homebrew