from PIL import Image img = Image.open("pic_1.png") print(img.filename) #pic_1.png #actual outcome: #AttributeError: \'Image\' object has no attribute \'get_f