The filter looks for them both at the root and under imagify (the latter overriding the former). Seems fine?
Yes - It seems fine to me to use same name key as default Pandoc. What I am suggesting is doing some special treatment in Lua and not just passing them through to override. This way I think you could catch a raw content in LaTeX that would be removed in HTML output and use it for your HTML processing.
In Quarto, perhaps in Pandoc, consider whether some Imagifying/LaTeX metadata picked up by the filter should be removed in non-LaTeX/PDF output. E.g. LaTeX options at the root and the like.
From this discussion:
In Quarto, perhaps in Pandoc, consider whether some Imagifying/LaTeX metadata picked up by the filter should be removed in non-LaTeX/PDF output. E.g. LaTeX options at the root and the like.