lordmauve / pgzero

A zero-boilerplate games programming framework for Python 3, based on Pygame.
https://pygame-zero.readthedocs.io/
GNU Lesser General Public License v3.0
527 stars 191 forks source link

Example alien.png downloads as alien.webp #311

Open sauron62833 opened 1 year ago

sauron62833 commented 1 year ago

I'm trying to follow the introduction, and hitting a problem at this point: https://pygame-zero.readthedocs.io/en/stable/introduction.html#draw-a-sprite

When I download the alien.png sprite, it downloads as alien.webp. This is a different format that I don't think Pygame Zero can use?

It can be downloaded fine from here: https://github.com/lordmauve/pgzero/blob/38cb6021496bd2f9dae0b37ef3ee6304dee71e2f/doc/_static/alien.png

I guess this is something to do with how your website is being generated?

Mooldool commented 1 year ago

Im not sure why its that way but you can use file converting services to change it to supported file formats. Just search "webp to png" and don't click ads.

lordmauve commented 1 year ago

I think ReadTheDocs has adopted a CloudFlare proxy that is re-encoding PNG files to WebP.

Pygame 2 actually supports WebP; we would just need to add .webp to the file extensions that Pygame Zero searches for when loading images.

Either way I think we need to change the instructions in the docs.

BruceMardle commented 1 year ago

Just noticed the same problem. It used to work. PS I hate .webp!