[repo] image preview: bug fix for firefox & improvement