{"id":28399153,"url":"https://github.com/galnetwen/random-image","last_synced_at":"2025-08-18T04:07:55.097Z","repository":{"id":38751657,"uuid":"128027012","full_name":"galnetwen/Random-Image","owner":"galnetwen","description":"随机图片服务","archived":false,"fork":false,"pushed_at":"2018-04-04T09:29:55.000Z","size":10453,"stargazers_count":169,"open_issues_count":3,"forks_count":44,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-07-11T15:56:22.811Z","etag":null,"topics":["picture","random"],"latest_commit_sha":null,"homepage":"https://song.acg.sx/images","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/galnetwen.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-04-04T07:49:00.000Z","updated_at":"2024-10-26T10:29:11.000Z","dependencies_parsed_at":"2022-07-09T04:46:07.325Z","dependency_job_id":null,"html_url":"https://github.com/galnetwen/Random-Image","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/galnetwen/Random-Image","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/galnetwen%2FRandom-Image","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/galnetwen%2FRandom-Image/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/galnetwen%2FRandom-Image/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/galnetwen%2FRandom-Image/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/galnetwen","download_url":"https://codeload.github.com/galnetwen/Random-Image/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/galnetwen%2FRandom-Image/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":270940873,"owners_count":24671725,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-18T02:00:08.743Z","response_time":89,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["picture","random"],"created_at":"2025-06-01T07:12:06.261Z","updated_at":"2025-08-18T04:07:55.070Z","avatar_url":"https://github.com/galnetwen.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"### 前言\n写文章想要配图，但是懒得挑图？\n网页背景千遍一律？\n\n最早的时候，经常听说“漫月API”，就很好奇这个是什么东东，因为“漫月”一词勾起了我的好感……\n\n在学长最初布置博客的时候，写文章都会挑选一张图给配上，避免页面太过单调，虽然学长我主张简洁、单栏展示的网页界面，但还是觉得有那么点缀还是舒服点呢 ~\n\n于是，就有了自己的私用随机图服务了。\n\n还是老样子，把代码整理一番，放到 GitHub 上面去……\n\n### 特性\n- 完全隐藏图片文件的真实地址\n- 支持调用域名白名单\n- 支持多文件夹分类目录\n- 前端调用支持使用随机数载入\n\n### 部署\n1. 下载代码，解压至你域名文件夹根目录\n2. 开启 Apache 或者 Nginx 的伪静态功能\n3. 访问：你的域名/images\n4. 大功告成\n\n### 配置\n打开 images.php 文件，添加域名白名单与默认文件夹即可。\n照葫芦画瓢，不用多说了吧。\n\n**多文件夹说明：**\n第二个文件夹无需配置，直接使用 URL 传递参数即可。\n\n比如：\n默认文件夹的分类，调用的域名是：“ 你的域名/images ”  \n其它文件夹的分类，调用是域名是：“ 你的域名/images/文件夹名 ”\n\n注意！\n若要使用随机数调用，必须启用 Apache 或者 Nginx 的伪静态功能，否则空白输出。  \nNginx 用户需要手动添加 nginx.conf 文件里面的伪静态规则到你的域名配置中去……\n\n使用随机数载入的情况通常在一个页面多次调用随机图的时候，比如首页文章列表，否则图片都是一样的。\n\n随机数载入方式：“ 你的域名/images?随机数 ” ，就是原有 URL 上添加一个英文问号和任意随机数。\n\n示例：\n```html\n\u003cimg src=\"https://song.acg.sx/images\"\u003e\n\u003cimg src=\"https://song.acg.sx/images/acg\"\u003e\n\u003cimg src=\"https://song.acg.sx/images?d8c196951e5bbf3edd158de4\"\u003e\n\u003cimg src=\"https://song.acg.sx/images/acg?9f0d34f8ee6f96b56d8902d1\"\u003e\n```\n\n项目演示：[https://song.acg.sx/images](https://song.acg.sx/images \"\")  \n项目代码：[https://github.com/galnetwen/Random-Image](https://github.com/galnetwen/Random-Image \"\")\n\n该随机图代码由 [karnc](https://karnc.com/ \"\") 提供与帮助，谢谢他！","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgalnetwen%2Frandom-image","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgalnetwen%2Frandom-image","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgalnetwen%2Frandom-image/lists"}