$image->rename()
Changes the name of the file without touching the extension
$image->rename(string $newName, bool $overwrite = false): Kirby\Image\Image
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
| $newNamerequired | string |
no default value | |
| $overwrite | bool |
false
|
Force overwrite existing files |
Return type
This method does not modify the existing $image object but returns a new object with the changes applied. Learn more →
Parent class
Kirby\Image\Image
inherited from Kirby\Filesystem\File