Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Retrieve pictures of players without background #350

Closed
ithawa opened this issue Dec 11, 2022 · 6 comments
Closed

Retrieve pictures of players without background #350

ithawa opened this issue Dec 11, 2022 · 6 comments

Comments

@ithawa
Copy link

ithawa commented Dec 11, 2022

I want to retrieve the pictures of players from a card for a specific season without the background.

examples:

  1. In football I found the "avatar" derivative for a card to get the face with the background and I use that query:
    {
    season(startYear: 2021) {
    cards(teamSlugs: "mainz-05-mainz", serialNumber: 1, rarities: rare) {
    nodes {
    pictureUrl(derivative: "avatar")
    }}}}

Are there more derivatives, to get a picture of the upper or the whole body from the picture for that card?
Is there a way to get the shown pictures without the background. I saw in the docs that there is a "SeasonPicture". Is that the right way and if yes how is it used?

  1. For NBA and MLB I'm using the following query and get the pictures from above:
    {
    baseballTeam(slug: "new-york-yankees") {
    players {
    avatarImageUrl
    }}}

Is there a parameter to get a picture without the background?

Thanks for your help in advance.

@ithawa ithawa changed the title Pictures of players without background Retrieve pictures of players without background Dec 11, 2022
@ithawa
Copy link
Author

ithawa commented May 17, 2023

Does someone have any update on this or is that not possible?

@jmallot21
Copy link

You now have access to 3 backgroundless images via player.

pictureUrl avatarPictureUrl squaredPictureUrl

image

@utay
Copy link
Member

utay commented Sep 19, 2023

Indeed, thank you @jmallot21 for the update!

@utay utay closed this as completed Sep 19, 2023
@ithawa
Copy link
Author

ithawa commented Sep 24, 2023

Thanks for the answer but it does not really solve my problems. That's because:

  1. This is only available in American sports but not in football.

  2. I assume that it only retrieves the current pictures but not those from older cards right? (I can't test cause I'm getting a "Invariant violation 2" in the background)

What I need are the pictures of players from cards without backgrounds. For example a picture of Mason Mount from his old card with a Chelsea jersey. At the moment I can only get the old picture with the background of the card or the current image without background but with the Manchester United jersey.

@philnind
Copy link

@ithawa did you solve your Invariant Violation error? I'm getting this too as of today but no idea why

@utay
Copy link
Member

utay commented Sep 27, 2023

@ithawa @philnind Sorry for the "Invariant Violation" error, this was due to a bug on our side and it is now fixed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants