https://github.com/lovell/sharp/issues/1105 seems like there is some experimental support but it requires a custom build.
It will require use with a custom, globally-installed libvips that has itself been compiled with support for libheif.
I use the direct message feature a lot in my own forum, however I feel that it is lacking a pretty normal feature, uploading images in direct messages. I believe that they would be used much more and would serve more of a purpose, as currently you can only send text.
This will be available in 1.19.2, will also allow drag drop in the quick reply box in persona