Overview

The ImageLoad endpoint returns the image of a specific object stored in the KoraStats platform. This endpoint is used to retrieve images for the following objects:
  • Players
  • Coaches
  • Referees
  • Clubs (logos)
The API returns the image binary directly instead of JSON.
The returned image is always in PNG format.
If the image cannot be found or the parameters are invalid, the API will return an error response. Typical usage includes:
  • Displaying player profile photos
  • Showing club logos
  • Loading coach images
  • Displaying referee avatars
GET /api.php

Parameters

module
string
Always use api
api
string
Always use ImageLoad
version
string
API version. Example: V2
object_type
string
required
Specifies the type of object whose image should be loaded.Supported values:
  • player
  • coach
  • referee
  • club
object_id
integer
required
The unique identifier of the object.Example:object_id=1

Supported Object Types

Object TypeDescription
playerReturns the player’s profile image
coachReturns the coach profile image
refereeReturns the referee profile image
clubReturns the club logo

Club Image Logic

When the object_type is set to club, the system first loads the team record using the provided object_id. The club logo is then retrieved using the club ID associated with that team. Example internal process: Team ID → Team Record → Club ID → Club Logo

Example Request

curl --request GET \
--url "https://korastats.pro/pro/api.php?module=api&api=ImageLoad&version=V2&object_type=player&object_id=1"

Response

The API returns binary image data.

Response Headers

Content-Type: image/png

Error Responses

Missing Object Type

Returned when the object_type parameter is not provided. Example Response
400 Bad Request
Message
no object type

Missing Object ID

Returned when the object_id parameter is not provided. Example Response
400 Bad Request
Message
no object id

Invalid Object Type

Returned when the provided object_type is not supported. Example
object_type=team
Response
400 Bad Request
Message
Invalid object type

Invalid Object ID

Returned when the object ID does not exist. Example Response
400 Bad Request
Message
Invalid Object ID

Image Not Found

Returned when the object exists but its image file does not exist on the server. Response
404 Not Found
Message
Resource not found