Hello! For some reason, every time I try to change the pokemon sprites, this happens. I tried to check in the code but couldn't figure out what the problem could be ^^; I picked all sprites from the same site as you used
Hi! Sorry you're having issues... this is one of the first codes I've ever put out, so it probably needs a bit of a rework. I tested it out and I have a few options that might help you.
First fix - The icon links I specifically used are from the first page of the site, not the pokemon page link. The pokemon sprite images from the Pokemon's individual page are larger.
You can tell if you have the right link if the link has 'icon' instead of 'normal' in the url.
- Small icon (right size): https://img.pokemondb.net/sprites/sword-shield/icon/litten.png
- Large sprite (wrong size): https://img.pokemondb.net/sprites/sword-shield/normal/litten.png
Second fix - If you want to use an icon from a different gen, you can add in some size limiters to the code. In the style attribute, you can add in "max-height: 50px; max-width: 60px" right behind "margin-right:5%" in between the quotation marks. You can adjust the pixel sizes for icons if they're looking a bit odd, but this is approximately the right size.
Hope this helps! Let me know if you're still having issues after.
Tysm for the kind answer! I have tried the first option and it worked! I didn't link them from the site itself since it's written hotlinking used their bandwith and stuff but I discovered that just saving the images and uploading them to discord works too! I made the mistake of saving bigger images before so that was causing the problem ;w; The first fix was very helpful, tysm! Gonna use this code soon as it's very useful. Have a great day! :D
[F2U] Pokemon Team's Comments