Messages contributes to your content by retaining the media you send and receive. This adds up over time to a bit of space as you'd imagine.
You can reduce this by choosing to keep message for a shorter time. The options are 30 days, 1 year, or forever.
Additionally you can delete the content in two ways:
- On the go by, for example, touching and holding on an image, selecting 'More' on the menu tree which appears at the foot of the screen. You will see that the image has a tick in the circle on the left. Then touch on the bin to delete it. Messages calls a photo a message, by the way.
- By navigating to Settings > General > iPhone Storage > Messages > Photosand sliding to the left to reveal a delete option for each image. I've found this less useful than it promises though.
Apple has a useful document about iPhone storage with some ideas on managing the space. See Manage your photo storage - Apple Support