Here some tests:
Upload a picture to post 77, full attach, saved as
21-8c83dda6afcd944fa1c01293b613d49e.jpg
11kb
xf_attachment
id 93
data_id 21
content 77
date 1723391003
rest 0, 0, 0
xf_attachment_data
data_id 21
hash ee2381568e63234ce7dc82c73cc1e493
key 8c83dda6afcd944fa1c01293b613d49e
attach_count 1
After rotating 180° there is shown the filename instead the picture:
Code:
<img src="http://localhost/index.php?attachments/2014b-jpg.93/" data-url="" class="bbImage" data-zoom-target="1" style="" alt="2014b.jpg" title="2014b.jpg" width="1000" height="800" loading="lazy">
New file
21-8986cc92f0b37860de6b982c179319dd.jpg
33kb
attachment
xf_attachment changed view_count 0=> 1
id 93
data_id 21
content 77
date 1723391003
rest 0, 0, 1
xf_attachment_data
data_id 21
hash ee2381568e63234ce7dc82c73cc1e493 > 8986cc92f0b37860de6b982c179319dd
key 8c83dda6afcd944fa1c01293b613d49e = 8c83dda6afcd944fa1c01293b613d49e
attach_count 1
Now i manually change the key in xf_attachment_data to the 8986cc92f0b37860de6b982c179319dd
from new filename 21-8986cc92f0b37860de6b982c179319dd.jpg
Back to post; everything is nice, the picture is shown rotated.
Conclusion:
Your addon does not change the field key after rotating on my system.
The old picture is not deleted.
The file size increases by 300%