Fix image preview in file dialog