fix for sending different image types.