> 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/loadfromurl.md).

# LoadFromUrl

从 URL 加载图像。推荐使用 [Load](/cn/api/load.md) 方法加载图像。

## 参数

<table><thead><tr><th width="198.4826833846656">参数名</th><th width="208.18338610093963">类型</th><th>说明</th></tr></thead><tbody><tr><td>url</td><td><code>string</code></td><td>图像 URL</td></tr></tbody></table>

## 返回值

`*imgo.Image` 类型的实例。

## 例子

```go
package main

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

func main() {
    url := "https://www.baidu.com/img/flexible/logo/pc/result.png"
    imgo.LoadFromUrl(url).
        Save("out.png")
}
```
