Imagine having two arrays of images named landscape_images[] and portrait_images[]. One is for the landscape view and the other for the portrait view. When the screen width is in landscape mode, the wide resolution images will be displayed on the body. Conversely, when the screen is in portrait mode, the long-sized images will be displayed. Each array consists of a list of objects that contain the source path of the image. How can this be achieved using React, CSS, JavaScript, and HTML?