How can a favicon be displayed in the browser when only an image is being shown?

When only an image is being shown in the browser, the favicon can still be displayed by adding a link tag in the head section of the HTML document. This link tag should point to the location of the favicon image using the "rel" attribute set to "icon". This will tell the browser to display the favicon image in the tab or bookmark bar.

<!DOCTYPE html>
<html>
<head>
    <link rel="icon" type="image/png" href="path/to/favicon.png">
</head>
<body>
    <img src="path/to/image.jpg" alt="Image">
</body>
</html>