How to organize Images in a game

for my purposes in small 2d-games i have an imageloader class which loads imagestrips and creates animation-objects by cutting them down into frame-pieces.
then they are stored in an array. up to now, this array is declared static (images are needed only once and for the whole program time), so i have the advantage that thousands of equal objects reference to the same animation within the imageloader.

but how should a gameobject know which one to choose ?
should a game-object have the image-name hardcoded in its class for sending a single request to the imageloader (load x.jpg and return the reference) ?

This really depends on your data design and personal preference.

if this is all set-up work then you don’t have to worry about the cost of a string compare over an int compare.

Some people like to have a generic “resource manager” that has symbolic (string) names for every resource. Some folks like to build the data in simple tables and use indexes.

For an example of a pretty complex set of resource management files, see the bioware NWN developers site. They have documented all their formats.