image part of database almost working properly