converting image model to implment DbConnectionAwareInterface instead of using global DbInstance