HomeSoftware Heritage

templates/content-display: Check content rendering for mime type first

Description

templates/content-display: Check content rendering for mime type first

The webapp can render some special content types (images, pdf) based on the
mimetype of the currently browsed content object.

However the checks of these mime types were done after the check for source
code rendering which could lead to errors client side.