In addition to my comment about not showing any code containing the
HTML attribute values should be quoted (browsers accept them usually also without quotes but it is not valid HTML) and must be quoted if they contain spaces or reserved characters:
<?php echo '<img src="' . $image_path . '" width="500" height="400">'; ?>
This code seems to be copied and pasted together and won't work as expected:
$sql="SELECT image_path FROM images where user_name = '".$_SESSION['username']."'";
$result = $con->query($sql);
If the above has been fixed to return a path from the database (or print some feedback if not), the path can be used for the
tag provided that the files exists and is a path relative to the web server's document root (beginning with '/') or relative to the current page.