get_image_tag() html output : empty src attribute

try the below:
You use a filter with more then one arg, add_filter by default will give 1 arg, you use 4 (out of 6) in my example I am given all 6 args to your function. If you want to use 4 change your function back and change the number in the add_filter.

<?php add_filter('get_image_tag', 'kh_image_attachment', 10/*prio*/, 6/*number of arguments*/);
function kh_image_attachment($html, $id, $alt, $title, $align, $size)
{
    //your code
}

It should work, questions? ask.