So you want to use the location.pathname stored in currentLink as a key to the "dictionary" object literal to retrieve the new image src?
Try this
Code:
albumCover[0].src = dictionary[currentLink];
Explanation: You have to use an index (e.g. [0]) on albumCover because getElementsByClassName always returns a collection of elements with the same class even if there's only one such element on the page.