After thinkphp5.0 compresses the picture, how to get the kb of the compressed picture?

how do I get the kb of the compressed image after thinkphp5.0 compresses it?
when I use save () to compress the image quality, I use the filesize (image path) in php; when I get the image size, I still get the image size before compression, but the actual size of the picture has changed! Please help, thank you!

Php
Apr.21,2022

...
/ / clear the cache and check the file size again
clearstatcache ();
echo filesize ("test.txt");

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b33e5b-2bee3.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b33e5b-2bee3.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?