Adding a dictionary to make the filtering faster

Fixing the images with resizing