View rendered SVG images in merge requests.

Description

When browsing a repository, clicking on a SVG file will allow you to preview the actual image.

However, if a SVG image is added to a branch and then included on a merge request, viewing the diff only allows you to see the image source code, unlike other image types which actually display the image.

For SVG, I can imagine there may be some edge cases where this is the desired behavior. But most likely, the person viewing the merge request will want to be able to see what the image actually looks like

Proposal

Display SVG files the same way as GIF and JPG files are currently displayed on diff views. Include javascript to allow the viewer of a diff to toggle between the image and source code.

Documentation blurb

When viewing a merge request including a SVG file, the image file will be included directly on the diff view. However, if you would prefer to view the source of the SVG, simply click on the "View SVG Source" button.