'Having trouble displaying the image with Picasso from JSON server in Android Studio

I made a JSON server and host it on localhost (localhost:3000/persons). This is my JSON:

[
  {
    "id": 0,
    "name": "Nikola",
    "surname": "Knezevic",
    "image": "/home/nikola/Public/CS330-Slike/bmw/bmw_neki_random_orange.png"
  }
]

I put my image in the Public folder and enabled Sharing over Network. I set logging for Picasso and it says this:

D/Picasso: Main        errored      [R0]+262ms Unrecognized type of request: Request{/home/nikola/Public/CS330-Slike/bmw/bmw_neki_random_orange.png}

However, when I replace the image URL to

https://media.geeksforgeeks.org/img-practice/banner/fork-cpp-thumbnail.png

It works perfectly and the image displays.

My question is, how do I store my images so I can put them on my JSON server so Picasso can display them?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source