使用指南与开发者文档 Guide & Developer Docs

壁纸设置 & 开发者接口

Wallpaper & Developer API

把喜欢的图片轻松设为电脑、手机或平板壁纸;也可以通过免费 API 把它引用到你的项目中。

Set any image as your desktop, phone or tablet wallpaper; or embed it via our free API.

把喜欢的图片设成壁纸

Set a Favorite Image as Wallpaper

电脑、手机、平板都适用,大约 10 秒即可完成。

Works on desktop, phone and tablet — takes about 10 seconds.

返回素材列表 Back to List

把喜欢的图片设为壁纸

Set a Picture as Wallpaper

在随机图廊或用户作品页, 点击图片下方的「下载高清原图」,保存到本地即可。 In the gallery or user page, click "Download HD original" below the image and save it locally.

  1. 手机:设置 → 墙纸 → 选取新墙纸 → 从相册中选择。 Phone: Settings → Wallpaper → Choose New Wallpaper → Photo Library.
  2. 电脑:右键图片 → 设为桌面背景(Windows);系统偏好设置 → 桌面与屏幕保护程序(macOS)。 Desktop: Right-click → Set as desktop background (Windows); System Settings → Desktop & Screen Saver (macOS).
  3. 平板:保存到相册后,在系统设置 → 墙纸中添加。 Tablet: save to Photos, then add via Settings → Wallpaper.

开发者接口

Developer API

一个 GET 请求拿一张随机图,无需密钥,直接可用。

One GET request returns one random image. No API key required.

ENDPOINT GET https://www.sjimg.com/img/{key}
  • 请求方式:GET,支持浏览器直接访问与跨域引用。 Method: GET, works in the browser and cross-origin.
  • 自适应尺寸:根据终端设备(手机 / 平板 / 桌面)自动返回匹配分辨率的图片,无需传参。 Adaptive size: returns a matching resolution based on the requesting device (phone / tablet / desktop) — no parameters needed.
  • 返回内容:图片二进制流(JPEG / PNG / WebP),可直接用于 <img> 或 CSS 背景。 Response: raw image bytes (JPEG / PNG / WebP), usable in <img> or CSS.
  • 输出格式:默认返回图片二进制流;添加 ?output=json 可获取 JSON 数据,包含图片地址与元信息。 Output format: returns raw image by default; add ?output=json to get JSON with image URL and metadata.
  • 鉴权:无需密钥,匿名即可调用,但请勿高频轮询。 Auth: none required; please avoid high-frequency polling.
  • 缓存:每次请求随机返回一张;加 ?_=时间戳 可绕过浏览器缓存。 Cache: a random image per request; append ?_=timestamp to bypass cache.
  • 响应时间:视图片体积而定,建议加 loading 占位与超时处理。 Latency: depends on file size; add a loading placeholder and timeout.
  • 用途限制:仅供学习交流,商业使用请先取得作者授权。 Usage: for learning and exchange only; commercial use requires permission.
分类 Category Key 示例地址 Example
风景 · 自然Scenery scenery /img/scenery
美女 · 女神Beautiful Woman woman /img/woman
帅哥 · 男神Handsome handsome /img/handsome
情侣 · 甜蜜Couple couple /img/couple
上班 · 职场Work work /img/work
季节 · 时令Season season /img/season
动物 · 萌宠Animal animal /img/animal
动漫 · 二次元Anime anime /img/anime
汽车 · 跑车 / 车模Car car /img/car
美食Food food /img/food
励志 · 正能量Motivation motivation /img/motivation
怀旧 · 年代Nostalgia nostalgia /img/nostalgia
瑜伽 · 健身Yoga yoga /img/yoga
植物 · 花卉Plant plant /img/plant
城市 · 建筑City city /img/city
运动 · 竞技Sports sports /img/sports
科技 · 数码Tech tech /img/tech
节日 · 庆典Festival festival /img/festival
抽象 · 设计Abstract abstract /img/abstract
其他Other other /img/other
HTML
<!-- 每次刷新页面都会换一张 -->
<img src="https://www.sjimg.com/img/scenery"
     alt="随机风景"
     loading="lazy">
CSS
.hero {
  background-image: url("https://www.sjimg.com/img/scenery");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}
JavaScript
const BASE = 'https://www.sjimg.com/img/';

// 换一张:key 见上方分类表
function roll(key = 'scenery') {
  const img = document.getElementById('pic');
  img.src = BASE + key + '?_=' + Date.now();
}

// 绑定按钮
document.querySelector('#roll')
  .addEventListener('click', () => roll('scenery'));
Markdown
<!-- 论坛 / 笔记里直接插入 -->

![随机风景](https://www.sjimg.com/img/scenery)

![随机车模](https://www.sjimg.com/img/car)
JSON (output=json)
{
  "success": true,
  "type": "scenery",
  "deviceType": "desktop",
  "data": {
    "img": "https://www.sjimg.com/1024x1468/Image_12345.jpg",
    "title": "无标题",
    "copyright": "无,中国 (© A/B Images)",
    "date": "20260917",
    "desc": "暂无描述",
    "urlbase": "Image",
    "type": "JPG"
  }
}

友情提醒:请不要高频轮询或批量抓取接口,以免给服务器带来压力; 引用时请注明来源「世界图库 World Gallery」,并遵守 《版权协议》。

Friendly reminder: please do not poll or scrape this endpoint aggressively. When embedding, credit “World Gallery” and follow our Terms of Service.