> For the complete documentation index, see [llms.txt](https://imgo.gitbook.io/cn/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://imgo.gitbook.io/cn/api/extension.md).

# Extension

返回当前图像的文件扩展。

## 参数

无

## 返回值

`string`

## 例子

```go
package main

import (
    "fmt"
    "github.com/fishtailstudio/imgo"
)

func main() {
    img := imgo.Load("gopher.png")
    fmt.Println(img.Extension())
}
```

输出：

```
png
```
