使用干预/图像模块移动和重命名图片

I'm using 'Intervention/image' module , have two folders , i want to move and rename image .

public/temp/image1.png to public/my-folder/my-image.png

Run simply php rename function

rename("/public/temp/image1.png", "/public/my-folder/my-image.png");

php rename manual

It does seems that Intervention Image is doing the actual upload. So in this case you will have to use Filesystem's method move (check out the rest of the methods for more available functionality).

Example:

if (!File::move($old, $new)) {
    // Display an error
}