Well, yes, we should actually have a list of image-file extensions somewhere and use that :-)

I'll file a separate issue for it.