Wait... Are you BASE64 encoding your data - twice?
First you do a base64_encode() on the uploaded file, then you select it from your table later on and echo() it yet again with base64_encode(). Try removing the base64_encode when doing your echo, and also try omitting the chunk_split() command when inserting data into the table.
Also, you don't have to base64 encode any data if you're looking to store binary data into a mySQL blob field, just do something this:
$img = mysql_real_escape_string(file_get_contents($_FILES['filename']['tmp_name']));
Then you may echo it with base64_encode() in your HTML.
Remember, since you're storing large chunks of data in your table, avoid using "SELECT * " queries, as this will significantly decrease performance. If you'll be storing much more larger chunks of data in your database, consider moving your data to the disk.