I’m not really sure why this doesn’t appear to have a settings toggle, but every time an image is sent in iMessage, some location is sent, whether it’s yours or location data from the image itself.
I’m assuming it’s the original location of the photo taken, but I’m not sure. I tested it by sending an image to myself (which was surprisingly difficult in iOS 17), and there was no data attached, but it was an image downloaded from Imgur.
Unable to edit post with Memmy (weird), but apparently this has been an option for years.