使用Unsplash API生成随机图片

使用Unsplash API生成随机图片

1、默认随机

示例如下:

https://source.unplash.com/random

2、指定用户

可以从特定用户账号中生成随机图像。URL格式如下

https://source.unsplash.com/user/{USERNAME}

点击示例1https://source.unsplash.com/user/angusyang9/likes

3、指定尺寸

设置要生成的图像的大小,实例如下:

https://source.unsplash.com/random/{WIDTH}x{HEIGHT}

点击示例2https://source.unsplash.com/random/300×300

4、根据关键词搜索

点击示例3https://source.unsplash.com/random/?city,night

5、联合使用

点击示例4https://source.unsplash.com/random/900×700/?fruit

你可能感兴趣的:(工具,学习方法)