Skip to content

Add icons for types per game (#191)#199

Merged
Naramsim merged 8 commits intoPokeAPI:masterfrom
DerCooleJustin:master
Mar 9, 2026
Merged

Add icons for types per game (#191)#199
Naramsim merged 8 commits intoPokeAPI:masterfrom
DerCooleJustin:master

Conversation

@DerCooleJustin
Copy link
Contributor

@DerCooleJustin DerCooleJustin commented Feb 28, 2026

Closes #191

As discussed in #191:
I moved already existing icons from /sprites/types/{generation}/{game}/*.png to [...]/{generation}/{game}/badges/*.png and added [...]/icons/*.png for each game that has these icons.

In this case, icons are purely the icons, and badges are icons with the type's name next to them. (Sometimes I just can't explain stuff properly so see the example below)

For games that do not have icons, I moved all images to [...]/{generation}/{game}/badges/.

Example Badge Example Icon
1 1

Copilot AI review requested due to automatic review settings February 28, 2026 21:07
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Copilot wasn't able to review any files in this pull request.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link

Copilot AI Feb 28, 2026

Choose a reason for hiding this comment

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

These PNGs embed an iCCP/ICC profile (iCCPICC profile). For sprite assets, this is typically unnecessary and adds size/noise across many files. Consider stripping ancillary metadata (iCCP/tEXt/zTXt/iTXt) via a lossless PNG optimizer (e.g., oxipng/pngcrush) so the repository stays smaller and assets are consistent.

Copilot uses AI. Check for mistakes.
Copy link

Copilot AI Feb 28, 2026

Choose a reason for hiding this comment

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

This asset includes a tEXtSoftware tag (Paint.NET v3.5.87) and other ancillary chunks. Consider stripping tool-identifying metadata across generated PNGs to keep builds reproducible and diffs stable (metadata frequently changes between export tools/versions even when pixels don’t).

Suggested change
���
IHDR��� ��� �������������sRGB���������gAMA������a���� cHRM��z&��������������u0���`��:����p��Q<��� pHYs����������(J�����IDAT8OŔ��� ��L�r���6RF��I����%

Copilot uses AI. Check for mistakes.
Comment on lines 1 to 3
Copy link

Copilot AI Feb 28, 2026

Choose a reason for hiding this comment

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

These PNG blobs are appearing in text diff form (showing �PNG plus control characters). To avoid any risk of line-ending normalization or accidental text conversions, ensure the repo enforces PNGs as binary (e.g., via .gitattributes with *.png -text or *.png binary). This helps keep assets intact and prevents noisy diffs.

Copilot uses AI. Check for mistakes.
@Naramsim
Copy link
Member

Naramsim commented Mar 2, 2026

Hi! Thanks for the PR! I see the point you are trying to solve.

Honestly I wouldn't change the location of the existing images. So no need to put every image in a badge folder. Instead, we can add these new smaller image versions in a dedicated small directory. I'm open to discuss whether this small name works well or not. I wouldn't use the name icon since even the images we currently have are icons.

@phalt
Copy link
Member

phalt commented Mar 3, 2026

+1 please do not move existing images, as it can have impact on API consumers and our pipelines for generating the API endpoints.

@DerCooleJustin DerCooleJustin marked this pull request as draft March 3, 2026 17:04
@DerCooleJustin
Copy link
Contributor Author

Thanks for the feedback, I definitely see the upsides with that, didn't really think about the API-side myself. Images now are where they were and icons folders are renamed to small.

@DerCooleJustin DerCooleJustin marked this pull request as ready for review March 4, 2026 14:04
@FallenDeity
Copy link
Contributor

Should we coerce all the small icons to same resolution to be consistent? they all seem to be squares so should be easily doable. Otherwise everything looks good imo :)

@Naramsim
Copy link
Member

Naramsim commented Mar 6, 2026

Yes we should have them all with the same resolution. I'd downscale the bigger opnes to match the resolution of the smallest.

For example, sprites/types/generation-vii/lets-go-pikachu-lets-go-eevee/small/13.png is smaller than 14.png

@DerCooleJustin
Copy link
Contributor Author

Just to clarify, downscale all of the image to the smallest resolution being at 60x60 from 86x86/96x96/128x128? Will do that now, but some images might be noticeably squished.

@DerCooleJustin
Copy link
Contributor Author

Okay i looked at the downscaled images, they look good to me.

@FallenDeity
Copy link
Contributor

Hey just a quick note the brilliant-diamond-... folder in gen 8 is named brilliant-diamond-and-shining-pearl in this repo while the game is named brilliant-diamond-shining-pearl.

image

I think this slipped by here https://github.com/PokeAPI/sprites/pull/139/changes can we you rename that folder to brilliant-diamond-shining-pearl

@DerCooleJustin
Copy link
Contributor Author

Yea, that got in via commit d34377f in #139. Should probably be its own issue for organization but imma fix it here anyways.

@DerCooleJustin
Copy link
Contributor Author

Actually i'm gonna undo it here and make a new issue. This deserves to be discussed differently, it's been like this for 1.5yrs and would potentially break 3rd party stuff like downloaders.

@FallenDeity
Copy link
Contributor

FallenDeity commented Mar 7, 2026

If they were consuming it from pokeapi then they would just be getting none back, if the downloaders were directly pulling from sprites repo then yeah that would be an issue

@Naramsim Naramsim merged commit 3a2f509 into PokeAPI:master Mar 9, 2026
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.

[REQUEST] Small Type Icons

5 participants