{"id":24761645,"url":"https://github.com/driebit/css-inline-images","last_synced_at":"2025-10-11T09:31:02.456Z","repository":{"id":21871974,"uuid":"25195554","full_name":"driebit/css-inline-images","owner":"driebit","description":"Node module for inlining images in a CSS file","archived":false,"fork":false,"pushed_at":"2018-01-24T08:50:45.000Z","size":4,"stargazers_count":2,"open_issues_count":1,"forks_count":2,"subscribers_count":21,"default_branch":"master","last_synced_at":"2025-01-16T16:42:06.412Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/driebit.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}},"created_at":"2014-10-14T07:46:27.000Z","updated_at":"2017-12-08T21:51:59.000Z","dependencies_parsed_at":"2022-07-23T16:02:09.864Z","dependency_job_id":null,"html_url":"https://github.com/driebit/css-inline-images","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/driebit%2Fcss-inline-images","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/driebit%2Fcss-inline-images/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/driebit%2Fcss-inline-images/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/driebit%2Fcss-inline-images/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/driebit","download_url":"https://codeload.github.com/driebit/css-inline-images/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":235847522,"owners_count":19054536,"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":[],"created_at":"2025-01-28T19:18:38.033Z","updated_at":"2025-10-11T09:30:57.154Z","avatar_url":"https://github.com/driebit.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"css-inline-images\n=================\n\nSimple node module for inlining images as base64 strings in CSS.\n\n## Installation\n\nInstall with NPM like any other package\n```bash\nnpm install css-inline-images\n```\n\n## Usage\nAppend `?embed` to the urls of the images that you want inlined\n\n```javascript\nvar cssInlineImages = require('css-inline-images'),\n    inputCss,\n    outputCss;\n\ninputCss = [\n    '.leave-me-alone {',\n        'background-image: url(file.gif);',\n    '}',\n\n    '.embed-me {',\n        'background-image: url(file.gif?embed);',\n    '}'\n].join('');\n\noutputCss = cssInlineImages(inputCss, {\n    webRoot: 'web',\n    path: 'otherImages'\n});\n```\n\nThe module will search for `url()` declarations in your CSS code so its use is not limited to background images.\n\n## Options\n\n* `webRoot`\n  The web root of your web project. This property will be used as a start point for all file paths.\n  This is enough for absolute urls (e.g.  `url(/images/file.gif?embed)`)\n\n* `path`\n  Used in addition to `webRoot` to determine the paths for relative urls (e.g. `url(images/file.gif?embed)`)\n\n### Example\n\nWith these options the following paths will be used to locate the images in the filesystem\n```javascript\n{\n    webRoot: 'web',\n    path: 'otherImages'\n}\n```\n* `url(/images/file.gif?embed)` =\u003e `web/images/file.gif`\n* `url(file.gif?embed)` =\u003e `web/otherImages/file.gif`\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdriebit%2Fcss-inline-images","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdriebit%2Fcss-inline-images","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdriebit%2Fcss-inline-images/lists"}