I’m able to get the property (URL, which responds with the URL to an image) I need for my application, but I need the image in a larger size.
‘t_thumb’ is interchangeable. I want that to be ‘t_1080p’. By changing that, the responded data would be a URL with a large image.
When I make the post request, it will always retrieve the URL with ‘t_thumb’, but I would prefer that part of the URL to be ‘t_1080p’, or another variable.
How can I do this?
I’ve tried looking at documentation, but haven’t had much luck. A user on the API’s message board suggested: "You need to manually find/replace on the URL string.", however, this doesn’t appear to be working.
2
Answers
Requesting images using the API returns a default image url using the t_thumb format. To request larger image sizes you should manually create your own image url using the image_id and the appropriate image size. example: https://images.igdb.com/igdb/image/upload/t_{size}/{image_id}.png
More information about images and image sizes can be found in our documentation, here
Check documentation for making the post request to retrieve covers: https://api-docs.igdb.com/#cover
Since you are looking for the 1080p version, this corresponds to a width of 1,920 pixels and height of 1,080 pixels.
Try posting again but with a body filter where game = 7334, width = 1920 and height = 1080.
Check other fields like "image_id" and also other endpoints that you post to like: https://api-docs.igdb.com/#artwork