How can PHP be used to insert an image in a forum signature where the img tag is blocked?

When the img tag is blocked in a forum signature, one way to insert an image is by using PHP to encode the image as base64 and then embed it directly into the HTML using a data URI. This way, the image is included as part of the HTML code itself, bypassing the need for the img tag.

<?php
$image_path = 'path/to/image.jpg';
$image_data = base64_encode(file_get_contents($image_path));
$image_type = pathinfo($image_path, PATHINFO_EXTENSION);
$image_src = 'data:image/' . $image_type . ';base64,' . $image_data;
echo '<img src="' . $image_src . '" alt="Image">';
?>