Images with HEVC compression already work in Discourse, they are converted to JPG in the backend. But those should be properly identified with the .heif extension.
AFAIK having HEVC compression in a JPG container is not valid.
Can you try to take a picture from your phone in HEVC and upload it directly here?