echo " ";
echo "<img src='" . $file_path . "' alt='am_rabbit'>";//within double quotes
or
<img src='<?php echo $file_path ?>' alt='am_rabbit'>//within single quotes
Complete code to echo image in php
<!DOCTYPE html>
<html>
<head>
<title>how do i echo an image with PHP</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.1/css/bootstrap.min.css">
</head>
<body>
<div class="container">
<br>
<br>
<div class="text-center">
<h1>echo an image with PHP</h1>
</div>
<br>
<br>
<div class="well">
<?php
$file_path = 'image/Rabbit.jpg';
echo "<img src='" . $file_path . "' alt='error'>";
?>
<img src='<?php echo $file_path ?>' alt='error'>
</div>
<br>
</div>
</body>
</html>