import os, json

images = sorted([f for f in os.listdir('images') if f.lower().endswith(('.jpg', '.png', '.gif'))])
with open('images.json', 'w') as f:
        json.dump(images, f)

