fix bug: image link is not processed before return