most social media sites already do that for you . Unless you upload the image as a document, most media sites automatically remove the exif and compress the img.
I dont get, can you give more context