PGM images fail to load if header is large: "assertion 'GDK_IS_PIXBUF_ANIMATION (animation)' failed"
A very useful feature of the PGM image format is that the header is in plain text and allows adding comments prefixed with a hash symbol. We use these comments to add metadata to stored images. The standard does not specify a limit to the amount or length of these comments, but EOG will fail to load the image ("Image loading failed") if the total size of the header exceeds some arbitrary length (approximately 4 KB).
Attached are two files containing a simple image (a 10x10 pixel white square) with comments in the headers. The only difference between the "good" and "bad" files is that there is one additional comment character in the latter's header.
This bug affects not only EOG but also the image preview functionality in the Nautilus and Nemo file managers and perhaps others.
Tested on EOG 3.28.1 on Ubuntu 18.04.