There are different CSS calls based on what is wanted to happen - foreground image, background image with hover swap, etc... The categories need different class tags to use each variant, so it has to check which variant to use, and all is controlled in one place (by loading the proper files).
Also, this avoids the situation of specifying that some text should be replaced by an image and if the image is missing there is nothing displayed. Cat Dressing, no image, and the standard text is displayed.

I have been learning about some even neater text replacement methods, and one day I may play with them and see if I can get the function even more streamlined.