Could you put something in Codepen with linked images?
I’m having trouble visualizing what this code is actually doing.
Are you swapping out images in a menu?
Are you showing a second image somewhere else on the page when one image is hovered?
You say it’s working (sort of)…could we see a link?