An electronic device comprising: a display (160; 260; 420; 520); a camera (291; 410; 510; 750; 960; 1050); at least one motion sensor (240; 530); and a processor (120; 210; 500; 760) electrically connected with the display (160; 260; 420; 520), the camera (291; 410; 510; 750; 960; 1050), and the at least one motion sensor (240; 530), wherein the processor (120; 210; 500; 760) is configured to: receive a signal for obtaining an image, obtain a preview image through the camera (291; 410; 510; 750; 960; 1050) in response to the received signal, identify a first motion of the electronic device through the at least one motion sensor (240; 530) while the preview image obtained through the camera (291; 410; 510; 750; 960; 1050) is displayed through the display (160; 260; 420; 520), and in response to the first motion corresponding to a panoramic capture motion obtain a plurality of images comprising a first object through the camera (291; 410; 510; 750; 960; 1050), identify orientations of the electronic device based on information obtained by the at least one motion sensor, each orientation of the identified orientations corresponding to times when the plurality of images are obtained, and change orientations of the first object in the plurality of images based on the identified orientations of the electronic device, and display a panoramic image of the plurality of images comprising the first object of which the orientations are changed through the display (160; 260; 420; 520), wherein the panoramic capture motion is a movement of the electronic device around a subject corresponding to the first object. a display (160; 260; 420; 520); a camera (291; 410; 510; 750; 960; 1050); at least one motion sensor (240; 530); and a processor (120; 210; 500; 760) electrically connected with the display (160; 260; 420; 520), the camera (291; 410; 510; 750; 960; 1050), and the at least one motion sensor (240; 530), wherein the processor (120; 210; 500; 760) is configured to: receive a signal for obtaining an image, obtain a preview image through the camera (291; 410; 510; 750; 960; 1050) in response to the received signal, identify a first motion of the electronic device through the at least one motion sensor (240; 530) while the preview image obtained through the camera (291; 410; 510; 750; 960; 1050) is displayed through the display (160; 260; 420; 520), and in response to the first motion corresponding to a panoramic capture motion obtain a plurality of images comprising a first object through the camera (291; 410; 510; 750; 960; 1050), identify orientations of the electronic device based on information obtained by the at least one motion sensor, each orientation of the identified orientations corresponding to times when the plurality of images are obtained, and change orientations of the first object in the plurality of images based on the identified orientations of the electronic device, and display a panoramic image of the plurality of images comprising the first object of which the orientations are changed through the display (160; 260; 420; 520), wherein the panoramic capture motion is a movement of the electronic device around a subject corresponding to the first object. receive a signal for obtaining an image, obtain a preview image through the camera (291; 410; 510; 750; 960; 1050) in response to the received signal, identify a first motion of the electronic device through the at least one motion sensor (240; 530) while the preview image obtained through the camera (291; 410; 510; 750; 960; 1050) is displayed through the display (160; 260; 420; 520), and in response to the first motion corresponding to a panoramic capture motion obtain a plurality of images comprising a first object through the camera (291; 410; 510; 750; 960; 1050), identify orientations of the electronic device based on information obtained by the at least one motion sensor, each orientation of the identified orientations corresponding to times when the plurality of images are obtained, and change orientations of the first object in the plurality of images based on the identified orientations of the electronic device, and display a panoramic image of the plurality of images comprising the first object of which the orientations are changed through the display (160; 260; 420; 520), obtain a plurality of images comprising a first object through the camera (291; 410; 510; 750; 960; 1050), identify orientations of the electronic device based on information obtained by the at least one motion sensor, each orientation of the identified orientations corresponding to times when the plurality of images are obtained, and change orientations of the first object in the plurality of images based on the identified orientations of the electronic device, and display a panoramic image of the plurality of images comprising the first object of which the orientations are changed through the display (160; 260; 420; 520), wherein the panoramic capture motion is a movement of the electronic device around a subject corresponding to the first object.