Fix previewing images in ranger