Image rotation on 3D cube

Hi,
I have a 3D cube, each side has a world space canvas with an image. Similar to dice cube but with images instead of dots. This cube gets rotated with a swipe (it’s a mobile game). If you flip the cube a few times the images keep the original rotation of the cube sides. I want the front facing image to be correctly rotated so that it’s not upside down or sideways. If I do image.transform.rotation = Quaternion.identity; all of the images are facing up including the ones on the sides. I want the images to keep the horizontal rotation relative to the canvas (and side of the cube) but always be aligned up.
Any suggestions?

transform.rotation is the worldspace rotation, independent of the parent rotation. You want to set the localRotation