PNGs are almost always smaller than GIFs for that sort of image (flags, icons, QR codes and such), especially at smaller size. But you’re correct, I did try GIFs too - you never know, they might be smaller in some circumstances ![]()
There are smaller file sizes with different formats, but they’re all lossy compression schemes that are totally unsuitable for simple geometry shapes in an indexed color space such as a flag design or a QR code. But for images that involve mostly human interpretation of fuzzy features, such as a photograph to put in a vCard on your tag for instance, WEBP works wonders. See this:
The compressed Amal is 555 bytes!