How to get only thumbnail from relation image

System Information
  • Strapi Version: “4.11.2”
  • Operating System: mac os 11.7.3
  • Database: mysql
  • Node Version: v18.16.1
  • NPM Version: 9.5.1
  • Yarn Version: n/a

Well, I have REST api URL : http://localhost:1337/api/news-papers?sort=id:DESC&pagination[start]=0&pagination[limit]=2&fields[0]=issue_date&populate[paper_img][fields][0]=formats

which gives data as follows, but my problem is i want to keep payload less thus i want only thumbnail from “formats” below. I have tried doing formats.thumbnail in above url but did not work.
{
“data”: [

    {
        "id": 5,
        "attributes": {
            "issue_date": "2023-05-01",
            "paper_img": {
                "data": {
                    "id": 87,
                    "attributes": {
                        "formats": {
                            "small": {
                                "ext": ".png",
                                "url": "/uploads/small_Screen_Shot_2023_07_27_at_7_13_20_PM_2059fe0e51.png",
                                "hash": "small_Screen_Shot_2023_07_27_at_7_13_20_PM_2059fe0e51",
                                "mime": "image/png",
                                "name": "small_Screen Shot 2023-07-27 at 7.13.20 PM.png",
                                "path": null,
                                "size": 8.18,
                                "width": 500,
                                "height": 458
                            },
                            "medium": {
                                "ext": ".png",
                                "url": "/uploads/medium_Screen_Shot_2023_07_27_at_7_13_20_PM_2059fe0e51.png",
                                "hash": "medium_Screen_Shot_2023_07_27_at_7_13_20_PM_2059fe0e51",
                                "mime": "image/png",
                                "name": "medium_Screen Shot 2023-07-27 at 7.13.20 PM.png",
                                "path": null,
                                "size": 14.78,
                                "width": 750,
                                "height": 686
                            },
                            "thumbnail": {
                                "ext": ".png",
                                "url": "/uploads/thumbnail_Screen_Shot_2023_07_27_at_7_13_20_PM_2059fe0e51.png",
                                "hash": "thumbnail_Screen_Shot_2023_07_27_at_7_13_20_PM_2059fe0e51",
                                "mime": "image/png",
                                "name": "thumbnail_Screen Shot 2023-07-27 at 7.13.20 PM.png",
                                "path": null,
                                "size": 2.27,
                                "width": 170,
                                "height": 156
                            }
                        }
                    }
                }
            }
        }
    }
],
"meta": {
    "pagination": {
        "start": 0,
        "limit": 2,
        "total": 6
    }
}

}


There isn’t any way to populate particular format size image.
The formats field is a single field and it stores the whole json object containing different images sizes.

The thumbnail url is the main image url, prefixed with thumbnail_
You could just retrieve the url (top level, no need to fetch the formats JSON) and prefix it