Assets Management
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
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
for symbols
and logos
the url can be reconstructed as such
https://assets.tcgdex.net/en/swsh/swsh3/symbol.{extension}
with {extension}
being replaced by png
, webp
or jpg
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")
on a Card
object
// get the final url String url = card.getImageUrl("high", "webp") // you can even get the image directly BufferedImage image = card.getImage("high", "webp")
on a Set
object
// get the final url String symbolURL = set.getSymbolUrl("webp") // get the symbol image buffer directly BufferedImage symbol = set.getSymbol("webp")
// get the final url String logoURL = set.getLogoUrl("webp") // get the logo image buffer directly BufferedImage logo = set.getLogo("webp")
Extension
Every assets are available with three extensions :
png
: card with Transparent backgroundjpg
: 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 formatlow
: get the image in a 245x337 format