# Player_Media::bake_avatar()

Cut the chosen square out of the original avatar and make it the avatar.

```php
bake_avatar( int $user_id, int $source_id, float $x, float $y, float $zoom )
```

## Parameters

- `$user_id` (int) Player.
- `$source_id` (int) Attachment ID of the original image.
- `$x` (float) Focal point, 0 to 1.
- `$y` (float) Focal point, 0 to 1.
- `$zoom` (float) Zoom, 1 to MAX_ZOOM.

## Return

`int|\WP_Error` Attachment ID of the new avatar.

## Changelog

| Version | Description |
| --- | --- |
| 1.6.3 | Introduced |
