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

reduce image size #173

Closed
wants to merge 1 commit into from
Closed

reduce image size #173

wants to merge 1 commit into from

Conversation

shenef
Copy link

@shenef shenef commented Aug 29, 2020

Reduces image size by getting compressed and smaller images from scryfall.
Unfortunately i can't test locally at the moment but all changed links are working.
Potential problems with this change:
The corners of the jpgs are not transparent, might clip the borders around the card and would be visible if a dark theme is added or a dark background is forced.

Closes #172

Copy link
Owner

@glacials glacials left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I cloned this locally and it seems to work great! And image size is reduced by ~10x! 🚀

I totally agree these should be the images loaded by default on the website, however in the API I'd love to continue to include full resolution for when consumers need it. e.g. in the mobile app you can fullscreen a card image by tapping on it, and I'd want that fullscreened version to gracefully try to switch to a full resolution image.

What would you think about deprecating this field and returning all possible Scryfall image URLs, so the consumer can pick? Something like

  "card_image": {
    "small": "https://img.scryfall.com/cards/small/front/7/c/7c77a6b1-ef06-4da5-8e86-a5204216cb77.jpg",
    "normal": "https://img.scryfall.com/cards/normal/front/7/c/7c77a6b1-ef06-4da5-8e86-a5204216cb77.jpg",
    "large": "https://img.scryfall.com/cards/large/front/7/c/7c77a6b1-ef06-4da5-8e86-a5204216cb77.jpg",
    "art_crop": "https://img.scryfall.com/cards/art_crop/front/7/c/7c77a6b1-ef06-4da5-8e86-a5204216cb77.jpg",
    "border_crop": "https://img.scryfall.com/cards/border_crop/front/7/c/7c77a6b1-ef06-4da5-8e86-a5204216cb77.jpg",
    "png": "https://img.scryfall.com/cards/png/front/7/c/7c77a6b1-ef06-4da5-8e86-a5204216cb77.png",
  }

Base automatically changed from master to main March 13, 2021 22:56
@glacials
Copy link
Owner

Closing due to inactivity, but feel free to reopen if updated.

@glacials glacials closed this May 16, 2023
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

Successfully merging this pull request may close these issues.

Reduce image size for banned cards
2 participants