My MYSQL db contains 5 rows
id, name, username, password, email, image
The image type is BLOB.
My PHP codes below to get JSON data from MYSQL.
while($row = mysqli_fetch_array($res)){
array_push($result,
array('id'=>$row[0],
'name'=>$row[1],
'username'=>$row[2],
'password'=>$row[3],
'email'=>$row[4],
'image'=>$row[5])
));
}
echo json_encode(array("result"=>$result));
My application will load longer than expected to parse the base64 image string from the returned JSON.
So what's the best way to store and retrieve image file efficiently?
imagepathand not image in yourdb, and show images in android from thatimagepathyou received viajson