title: Fetch images and metadata from PHP server to android
body: <p>My android app needs to fetch some info from a php server that hosts a MySQL database. It works fine so far. The server encodes the info into JSON and sends it and then I can parse it well.</p>
  
  <p>But now I need to also fetch an image together with each row of info I get from the DB. The info I'm getting has a field where it specifies the path where the correspondent image is located in the filesystem.</p>
  
  <p>So, once I get the paths of the images, how do I read them so that I can send them together with the info rows obtained? Can I JSON encode the images together with the info? Or should I read them one by one with readfile once I have the info in the android app? If it can be done with JSON, how do you parse the data of the image afterwards? Can you provide an example?</p>