You don't wrap it in quotes like that as if that would parse it would be <img src="'ALT'.png"/> which isn't correct. You simply use:
<?php echo '<img src="' . $team_id . '.png" alt=""/>';. It must be echoed through PHP if you want to parse a variable.
If you do this though, I'd suggest not using the $team_id and using a second variable, or not running $team_id through mysql_real_escape_string until its used within the query. Then you should use urlencode on the $team_id within the img tag in case it contains characters that need to be interpreted differently such as a space.
As of PHP 5.5, the MySQL library has been officially deprecated. It is recommended to move to either MySQLi or PDO libraries for your mysql connectivity. See here for help choosing which interface you prefer: http://php.net/manual/en/mysqlinfo.api.choosing.php