An electronic device comprising: a display; at least one processor; and a memory operatively connected to the at least one processor, wherein the memory stores instructions that cause, when executed, the at least one processor to: display a dynamic image in a stopped state, receive a drag input with a path onto an area in which the dynamic image is displayed in the stopped state, switch the dynamic image from the stopped state to a playback state while the drag input is received in the dynamic image, display the path of the drag input superimposed on the dynamic image, which has been switched from the stopped state to the playback state, and restore the dynamic image from the playback state to the stopped state, in response to the drag input being released from the display or in response to a predetermined period of time having elapsed since the drag input is released from the display, and display at least one first object (334, 335) for editing a portion of the path of the drag input, wherein the at least one first object (334, 335) provides a function of removing at least a portion of the path of the drag input from the dynamic image. a display; at least one processor; and a memory operatively connected to the at least one processor, wherein the memory stores instructions that cause, when executed, the at least one processor to: display a dynamic image in a stopped state, receive a drag input with a path onto an area in which the dynamic image is displayed in the stopped state, switch the dynamic image from the stopped state to a playback state while the drag input is received in the dynamic image, display the path of the drag input superimposed on the dynamic image, which has been switched from the stopped state to the playback state, and restore the dynamic image from the playback state to the stopped state, in response to the drag input being released from the display or in response to a predetermined period of time having elapsed since the drag input is released from the display, and display at least one first object (334, 335) for editing a portion of the path of the drag input, wherein the at least one first object (334, 335) provides a function of removing at least a portion of the path of the drag input from the dynamic image. display a dynamic image in a stopped state, receive a drag input with a path onto an area in which the dynamic image is displayed in the stopped state, switch the dynamic image from the stopped state to a playback state while the drag input is received in the dynamic image, display the path of the drag input superimposed on the dynamic image, which has been switched from the stopped state to the playback state, and restore the dynamic image from the playback state to the stopped state, in response to the drag input being released from the display or in response to a predetermined period of time having elapsed since the drag input is released from the display, and display at least one first object (334, 335) for editing a portion of the path of the drag input, wherein the at least one first object (334, 335) provides a function of removing at least a portion of the path of the drag input from the dynamic image.