The Messages app on your iPhone can quickly grow to be one of your biggest storage hogs, especially if your friends use it to share a lot of photos with you. If after taking a look at Settings -> General -> iPhone Storage you decide you want to start deleting message threads to free up storage, you probably will want to keep some of the images in those threads.
Saving individual photos is easy enough, just long press the image until a list of options pops up. Tap “Save” and it will save to your Camera Roll in the All Photos folder (and in the Animated folder as well if it is a GIF).
This can be tedious to say the least if you have tens or hundreds of images in a message thread. Luckily there is a much faster way to select all of the images you want to save. To do so, open a thread and tap the info icon in the top right.
Now you can mass select the photos by tapping on them. The ones you select will be checked off. When you have selected all the images you want to save, tap the save images button in the bottom left to save them to your camera roll.