added convertion to allow reading foto from db