enable image previews
fix bug when canceling image modal