So, you are saying your server allows you to have two files with the same name in the same folder?
Note that not all attachments are .jpg files.
When an attachment is uploaded, its name is replaced with a randomly generated hex string and its extension is removed. This both allows two different files with the same real filename to co-exist in the /files folder, as they now have different physical filenames, and adds security by hiding the file type.
The attachments table in the database keeps track of what real filename corresponds to each physical filename. It also keeps track of the filesize. So, I THINK that once you change the filesize, the reduced size file is not recognized by the database.
I do not believe there is an easy way to do what you want. I think you would have to download the physical file, determine its real name from the database and rename it, delete the attachment from the post, reduce the size of the file, and edit the post to add the reduced file as an attachment.
good and VERY
inexpensive hosting CLICK HERE
I can stop all your spam.
PM or email me.
All unsolicited PMs will be ignored.