fix bug if the image doesn t exist (or if the image set is only a folder)