Fix logic for adding images to resample by path