title: Detect media (image, video) type by URL
body: <p>Based on the URL I need to show either <code>&lt;img&gt;</code> or <code>&lt;video&gt;</code>. Is there a way to detect the media type based on the URL? Or maybe there is some generic html tag that allows to view both image and video? And there is no specific file extension at the end of the URL.</p>