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");

Menu