Salta ai contenuti

Assets Management

Questi contenuti non sono ancora disponibili nella tua lingua.

When you try to get an image from the API you might mostly get an url ending without any extension like below.

https://assets.tcgdex.net/en/swsh/swsh3/136

That’s normal.

We allows you to customise the extension and quality (for Cards) of the image you want.

For cards the url can be reconstructed as such

Terminal window
https://assets.tcgdex.net/en/swsh/swsh3/136/{quality}.{extension}

with {quality} being replaced by high or low

and {extension} being replaced by png, webp or jpg

see details below


Some of the SDKs have helpers to easily reconstruct them

on a Card object

// get the final url
val url = card.getImageUrl("high", "webp")
// you can even get the image directly
val image = card.getImage("high", "webp")

on a Set object

// get the final url
val symbolURL = set.getSymbolUrl("webp")
// get the symbol image buffer directly
val symbol = set.getSymbol("webp")
// get the final url
val logoURL = set.getLogoUrl("webp")
// get the logo image buffer directly
val logo = set.getLogo("webp")

Extension

Every assets are available with three extensions :

  • png: card with Transparent background
  • jpg: card with Black background (not Recommanded)
  • webp: Modern format that is more compact than png/jpg with a transparent background (Recommanded)

Quality

Every assets are available with three extensions :

  • high: get the image in a 600x825 format
  • low: get the image in a 245x337 format