Internal
Upload and compress image
Changed onUpload an image file (PNG, JPEG, or SVG), optionally resize it, and compress it for web. SVG files are rasterized before publication. Returns the uploaded image URL and metadata.
post/internal/upload/image
Request
- Base URLhttps://api.session.services
- AuthAPI key in header x-tenant-id
Request body
object required
file, unknown
folder, 'avatars' | 'events' | 'teams' | 'promoters' | 'venues' required
Folder to upload to
width, integer
Target width in pixels
height, integer
Target height in pixels
Response
OK
object required
src, string uri required
alt, string required
width, number required
height, number required
Example response
{
"src": "https://assets.session.services/my-image.jpg",
"alt": "My Image",
"width": 1080,
"height": 1080
}Changes
- breaking
the
heightrequest property type changed fromnumbertointeger - breaking
the
widthrequest property type changed fromnumbertointeger - warning
the
heightrequest property's exclusiveMinimum was set to0.00
5 more changes in this revision
- breaking