{"id":23081244,"url":"https://github.com/lagden/postcss-inline-base64","last_synced_at":"2025-06-20T22:37:49.909Z","repository":{"id":5455020,"uuid":"53215303","full_name":"lagden/postcss-inline-base64","owner":"lagden","description":"PostCSS plugin used to replace value inside of url function to base64","archived":false,"fork":false,"pushed_at":"2023-10-07T16:49:35.000Z","size":883,"stargazers_count":25,"open_issues_count":3,"forks_count":2,"subscribers_count":4,"default_branch":"master","last_synced_at":"2024-11-28T13:09:29.261Z","etag":null,"topics":["base64","font-face","image","inline","plugin","postcss","src","svg","url"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/postcss-inline-base64","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/lagden.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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,"publiccode":null,"codemeta":null}},"created_at":"2016-03-05T18:02:18.000Z","updated_at":"2023-08-03T19:49:27.000Z","dependencies_parsed_at":"2024-06-18T19:50:55.166Z","dependency_job_id":"519e589d-f770-43c3-8cfe-f52797f59377","html_url":"https://github.com/lagden/postcss-inline-base64","commit_stats":{"total_commits":70,"total_committers":3,"mean_commits":"23.333333333333332","dds":0.02857142857142858,"last_synced_commit":"d7df354eb077bf8c6789edf866e8a3ffb01ae4da"},"previous_names":[],"tags_count":24,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lagden%2Fpostcss-inline-base64","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lagden%2Fpostcss-inline-base64/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lagden%2Fpostcss-inline-base64/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lagden%2Fpostcss-inline-base64/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lagden","download_url":"https://codeload.github.com/lagden/postcss-inline-base64/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":229970660,"owners_count":18152701,"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":["base64","font-face","image","inline","plugin","postcss","src","svg","url"],"created_at":"2024-12-16T13:50:09.307Z","updated_at":"2024-12-16T13:50:09.773Z","avatar_url":"https://github.com/lagden.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# PostCSS Inline Base64\n\n[![Node.js CI][ci-img]][ci]\n[![Coverage Status][cover-img]][cover]\n[![Snyk badge][snyk-img]][snyk]\n\n[PostCSS](https://github.com/postcss/postcss) plugin used to replace value inside of url function to base64\n\n[PostCSS]:   https://github.com/postcss/postcss\n[ci-img]:    https://github.com/lagden/postcss-inline-base64/actions/workflows/nodejs.yml/badge.svg\n[ci]:        https://github.com/lagden/postcss-inline-base64/actions/workflows/nodejs.yml\n[cover-img]: https://codecov.io/gh/lagden/postcss-inline-base64/branch/master/graph/badge.svg\n[cover]:     https://codecov.io/gh/lagden/postcss-inline-base64\n[snyk-img]:  https://snyk.io/test/github/lagden/postcss-inline-base64/badge.svg\n[snyk]:      https://snyk.io/test/github/lagden/postcss-inline-base64\n\n\n## Usage\n\nSee the [example](#example) below\n\n```js\nimport postcssInlineBase64 from 'postcss-inline-base64'\n\npostcss([\n  postcssInlineBase64(options),\n])\n```\n\n\nIf you are using `CommonJS module`:\n\n```js\npostcss([\n  require('postcss-inline-base64')(options),\n])\n```\n\n### Options\n\nName        | Type    | Default        | Description\n----------- | ------- | -------------- | ------------\nbaseDir     | string  | process.cwd()  | Path to load files\n\n\n## Example\n\nUse the syntax below inside `url()` function:\n\n```\nVariations:\n\n - b64---{file}---\n - b64---'{file}'---\n - b64---\"{file}\"---\n - 'b64---{file}---'\n - \"b64---{file}---\"\n```\n\n\n### input\n\n```css\n:root {\n  --image: 'b64---./example.gif---';\n}\n\n@font-face {\n  font-family: 'example';\n  src: url('b64---./example.woff---') format('woff'), url('b64---./example.woff2---') format('woff2');\n  font-weight: normal;\n  font-style: normal;\n}\n\nbody {\n  background-color: gray;\n  background-image: url(var(--image));\n}\n\n.notfound {\n  background-image: url('b64---https://file.not/found.png---');\n}\n\n.ignore {\n  background-image: url('https://cdn.lagden.in/mask.png');\n}\n```\n\n\n### output\n\n```css\n:root {\n  --image: 'data:image/png;charset=utf-8;base64,iVBORw0K...SuQmCC';\n}\n\n@font-face {\n  font-family: 'example';\n  src: url('data:font/woff;charset=utf-8;base64,d09...eLAAAA==') format('woff'), url('data:font/woff2;charset=utf-8;base64,d09...eLAAAA==') format('woff2');\n  font-weight: normal;\n  font-style: normal;\n}\n\nbody {\n  background-color: gray;\n  background-image: url(var(--image));\n}\n\n.notfound {\n  background-image: url('https://file.not/found.png');\n}\n\n.ignore {\n  background-image: url('https://cdn.lagden.in/mask.png');\n}\n```\n\n---\n\nSee [PostCSS](https://github.com/postcss/postcss/tree/master/docs) docs for examples for your environment.\n\n\n## Donate ❤️\n\n- BTC: bc1q7famhuj5f25n6qvlm3sssnymk2qpxrfwpyq7g4\n- PIX: lagden@gmail.com\n\n\n## License\n\nMIT © [Thiago Lagden](https://github.com/lagden)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flagden%2Fpostcss-inline-base64","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flagden%2Fpostcss-inline-base64","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flagden%2Fpostcss-inline-base64/lists"}