add file extension image dynamics

file extension image dynamically changes with type of file