{"id":23269034,"url":"https://github.com/guqing/plugin-cloudinary","last_synced_at":"2025-08-21T01:31:35.678Z","repository":{"id":229137682,"uuid":"775859655","full_name":"guqing/plugin-cloudinary","owner":"guqing","description":"使用 Cloudinary 提供的服务来优化 Halo 主题端的图片媒体资源以提高网站的图片资源加载速度和性能。","archived":false,"fork":false,"pushed_at":"2024-04-19T08:25:38.000Z","size":6127,"stargazers_count":3,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-04-19T09:32:51.381Z","etag":null,"topics":["cms","halo","image-compression","plugin","website","website-builder"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/guqing.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2024-03-22T07:27:11.000Z","updated_at":"2024-03-22T09:18:55.000Z","dependencies_parsed_at":"2024-04-11T11:51:25.779Z","dependency_job_id":null,"html_url":"https://github.com/guqing/plugin-cloudinary","commit_stats":null,"previous_names":["guqing/plugin-cloudinary"],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/guqing%2Fplugin-cloudinary","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/guqing%2Fplugin-cloudinary/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/guqing%2Fplugin-cloudinary/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/guqing%2Fplugin-cloudinary/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/guqing","download_url":"https://codeload.github.com/guqing/plugin-cloudinary/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":230477061,"owners_count":18232327,"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","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":["cms","halo","image-compression","plugin","website","website-builder"],"created_at":"2024-12-19T17:41:07.796Z","updated_at":"2024-12-19T17:41:08.571Z","avatar_url":"https://github.com/guqing.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# plugin-cloudinary\n\n\u003e[!WARNING]\n\u003e 目前已经在 Halo [#6454](https://github.com/halo-dev/halo/pull/6454) 中实现了缩略图功能，因此本插件不再维护。\n\n使用 Cloudinary 提供的服务来优化 Halo 主题端的图片媒体资源以提高网站的图片资源加载速度和性能。\n\n## How does it work?\n\n1. 通过拦截主题端的 HTML 页面，解析其中的 `\u003cimg\u003e` 元素得到图片资源的 URL。\n2. 通过 Cloudinary 提供的 API 生成不同尺寸且格式为 Webp 的图片资源 URL。\n3. 修改 HTML 页面中的 `\u003cimg\u003e` 元素，增加 `srcset` 属性，以便浏览器根据不同的屏幕尺寸选择合适的图片资源加载。\n\n通过以上步骤，可以有效地提高网站的图片资源加载速度和性能。\n\n## Configuration\n\n1. 在 [Cloudinary](https://console.cloudinary.com/) 注册账号。\n2. 在 Cloudinary 控制台的 Getting Started 页面中找到 Cloud name、API Key 和 API Secret 信息，可以点击 View Credentials 查看。\n3. 在 Halo 后台的插件管理中配置此插件的 Cloud name、API Key 和 API Secret 信息为对应的值。\n4. 保存配置并清理一下页面缓存就已经生效了。\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fguqing%2Fplugin-cloudinary","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fguqing%2Fplugin-cloudinary","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fguqing%2Fplugin-cloudinary/lists"}