PokeAPI / pokeapi

The Pokémon API
https://pokeapi.co
BSD 3-Clause "New" or "Revised" License
4.18k stars 940 forks source link

Incorrect sprite URLs #736

Closed marko-knoebl closed 1 year ago

marko-knoebl commented 2 years ago

If I access

https://pokeapi.co/api/v2/pokemon/1

the value of sprites.front_default is:

https://raw.githubusercontent.com/PokeAPI/sprites/master/https://raw.githubusercontent.com/PokeAPI/sprites/master/sprites/pokemon/1.png

https://raw.githubusercontent.com/PokeAPI/sprites/master/sprites/pokemon/1.png

Looking at some code examples / demos that are using this API, they are all not showing images anymore at the moment

A couple of hours ago, images were still working for me

mertthesamael commented 2 years ago

Same here, i thought my code just blown up

igordeoliveira95 commented 2 years ago

The moment I deployed my personal project this occurs haha, waiting for fixes.

Naramsim commented 2 years ago

Hi all, I'm really sorry for the problem. I rolled back and purged the Cloudflare cache. Thanks for raising the issue

marko-knoebl commented 2 years ago

Thanks for the quick fix! Everything seems to be working again from my POV

Naramsim commented 2 years ago

Hi, this isn't a fix, just a roll back. This is the PR (https://github.com/PokeAPI/pokeapi/pull/727) that broke the sprites.

I think we add the duplicated https://raw.githubusercontent.com/PokeAPI/sprites/master/ not in the build phase, but in Ditto or something. I'll investigate next Monday.

C-Garza commented 1 year ago

Was this issue resolved in #745 @Naramsim?

jayk-gupta commented 1 year ago

If I access

https://pokeapi.co/api/v2/pokemon/1

the value of sprites.front_default is:

https://raw.githubusercontent.com/PokeAPI/sprites/master/https://raw.githubusercontent.com/PokeAPI/sprites/master/sprites/pokemon/1.png

  • which is not a valid image URL - a correct value would be:

https://raw.githubusercontent.com/PokeAPI/sprites/master/sprites/pokemon/1.png

Looking at some code examples / demos that are using this API, they are all not showing images anymore at the moment

A couple of hours ago, images were still working for me

Not working

Naramsim commented 1 year ago

Not true, I get https://raw.githubusercontent.com/PokeAPI/sprites/master/sprites/pokemon/back/1.png which is valid