In case any one else finds this and is having issues, there is a missing quotation mark in this line:
echo '<img src="' . $image . ' />'; //change depending on the return value of the image field
should be
echo '<img src="' . $image . '" />'; //change depending on the return value of the image field