Changed the way to store images