Best compression method for textures

Hello,
which compression method is currently the best for large amounts of files?

Currently, I have ± 300mb of images as a lossless .png and I’d love to compress it so it’ll be downloaded faster. I’ve read, that Phaser doesn’t support WEBP or AVIF file formats, but on the other hand it offers different compression formats (ETC, ETC1, ATC, ASTC, BPTC, RGTC, PVRTC, S3TC, and S3TCSRB). Which one of them is the best in terms of decreasing the final size?

Best regards,
Luke

Both AVIF and WEBP are supported I think (see https://labs.phaser.io/edit.html?src=src/textures\avif%20test.js). I think the other formats you mention are GPU compression ones, with their goal being lower VRAM usage. Not necessarily lower download size. That might be important for you too though, as fitting 300MB of PNGs, uncompressed, into VRAM probably isn’t going to be easy either.
Which one is best, not sure, I assume it depends on which one the device actually supports, and then picking the best one (i.e. smallest one) from that.

Thank you, I didn’t know that. Yeah, sometimes I’ve got problems with Context ( Phaser and WebGL context restoration handling ) and I couldn’t find the reason. May it be the reason?

Which compression do you use?

Not sure, but I can imagine that running out of VRAM could cause context loss, if not a downright crash. Keep in mind that textures, when uncompressed, are always 4 bytes per pixel (unless you use compressed textures like the ones you mentioned before). So some 4096x4096 PNG might be just a few hundred KB, but in VRAM it will always take 64MB (more if you enable mipmapping).

I only ever used PNG/JPG so far, but I’ve never made a game that needed so many textures.

Where I can read about it? I tried to find an article about compressing textures and dealing with them, but I’ve got more knowledge from your two posts than the whole article.