# 【alfred插件】指定尺寸随机生成测试图片到桌面

* 抖音：<https://v.douyin.com/iUhr3hva/>
* B站：<https://www.bilibili.com/video/BV1Uj421U7qo/>

前两天在测试系统的时候

碰到一个非常麻烦的问题

就是很多功能都需要上传图片

而且呢这个图片的尺寸要求都不一样

但是呢这个图片又是个必填项

不传的话流程又走不下去

后来呢我就先是找到了这个网站

它呢非常方便

可以根据尺寸直接来下载随机的图片

比如这样

大家看这是随机的一张图片

但是呢上面的地址栏就变了

我就不能直接在上面说

直接改尺寸再访问了哈

我每次就得重新的复制这个

然后呢粘贴再来改尺寸

然后再保存到桌面就很麻烦

所以后来呢我就写了一个alfred

这个小插件，（使用）特别简单

怎么用呢

大家看我在这想要一个200\*200的

我就把它复制一下

然后呢输入randompic

然后把这个尺寸粘过来

200x200这个地方也可以用星都可以哈（现在是字母x）

回车

大家看 这就有了

好然后呢我们在这选

比如先选一张错误的

他就不行

那我选一张正确的大家看

这样就可以了

那其实这个插件很简单啊

只是他封装了刚才那个网站

然后替我们去输入这两个尺寸的参数

然后最后呢做一个终端的命令

然后把它curl保存起来就可以了

这个插件呢老样子

我还是把它放到github这个仓库里了啊

在这里 random\_pic


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://sunzsh.gitbook.io/xiaoshan.bug/alfred-cha-jian-zhi-ding-chi-cun-sui-ji-sheng-cheng-ce-shi-tu-pian-dao-zhuo-mian.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
