img tag returns the
alt value because the image that you have provided is not a correct image.
You need to fix the code itself in
barcode.php so that the image is properly created and should probably check the result in the browser first so you know that the result of calling
barcode.php is actually an image.