旋转后,图像的大小会增加

I get a strange behaviour...

Using this script for image manipulation (rotation), every time I use the image size increases.

e.g. after using it twice the image changes from 168.4 to 53.2 Kb.

$image_source = imagecreatefromjpeg($path_u);
$rotate = imagerotate($image_source, $angle, 0);
imageinterlace($rotate, true);

unlink($path_u);
imagejpeg($rotate, $path_u, 100);
imagedestroy($rotate);

There is something wrong or are the gd functions that make this effect?

imagejpeg($rotate, $path_u, 100);

If you are saving it with 100% quality it will take more disk space, even if the quality will stay the same

You've set a quality setting of 100%. The original image was likely created with a lower quality setting.