Merge Request diffs show decoding failure when opening new Image file

Summary

Continuation of !1319 (merged). Selecting a new file in a Merge Request will function, but for Images and other media, the panel for the Old file will show an error.

Steps to reproduce

This can be reproduced on any merge request that includes a new image file, for example viktomas/test-project!6 (closed)

What is the current bug behavior?

The text "An error occured while loading the image" shows in one of the panels.

What is the expected correct behavior?

The extension should match the behavior of Visual Studio Code's source control tab, which is to not open a Diff for new images but only open the image directly.

This applies to all file types that use VS Code's default media preview, which are listed here: https://github.com/microsoft/vscode/blob/main/extensions/media-preview/README.md

Relevant logs and/or screenshots

image-diff

Edited by Lennard Sprong