{"id":30528790,"url":"https://github.com/viktorlarsson/gulp-inject-svg","last_synced_at":"2025-08-27T05:21:55.648Z","repository":{"id":56682969,"uuid":"52963075","full_name":"viktorlarsson/gulp-inject-svg","owner":"viktorlarsson","description":"This gulp plugin will check all img tags with an external svg and replace the tag with inline svg.","archived":false,"fork":false,"pushed_at":"2020-10-25T14:50:22.000Z","size":29,"stargazers_count":19,"open_issues_count":7,"forks_count":12,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-07-24T17:30:06.121Z","etag":null,"topics":["gulp","inline","svg"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/viktorlarsson.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-03-02T13:01:57.000Z","updated_at":"2021-04-17T11:53:56.000Z","dependencies_parsed_at":"2022-08-15T23:10:54.926Z","dependency_job_id":null,"html_url":"https://github.com/viktorlarsson/gulp-inject-svg","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/viktorlarsson/gulp-inject-svg","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/viktorlarsson%2Fgulp-inject-svg","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/viktorlarsson%2Fgulp-inject-svg/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/viktorlarsson%2Fgulp-inject-svg/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/viktorlarsson%2Fgulp-inject-svg/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/viktorlarsson","download_url":"https://codeload.github.com/viktorlarsson/gulp-inject-svg/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/viktorlarsson%2Fgulp-inject-svg/sbom","scorecard":{"id":921638,"data":{"date":"2025-08-11","repo":{"name":"github.com/viktorlarsson/gulp-inject-svg","commit":"bc86a43d9ceedda26aedb7293090bea77ebb8767"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3.2,"checks":[{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Code-Review","score":1,"reason":"Found 4/21 approved changesets -- score normalized to 1","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE.md:0","Info: FSF or OSI recognized license: BSD 3-Clause \"New\" or \"Revised\" License: LICENSE.md:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 13 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}}]},"last_synced_at":"2025-08-25T03:58:33.618Z","repository_id":56682969,"created_at":"2025-08-25T03:58:33.618Z","updated_at":"2025-08-25T03:58:33.618Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":272214402,"owners_count":24893197,"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-26T02:00:07.904Z","response_time":60,"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":["gulp","inline","svg"],"created_at":"2025-08-27T05:21:54.517Z","updated_at":"2025-08-27T05:21:55.642Z","avatar_url":"https://github.com/viktorlarsson.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# gulp-inject-svg\n\n[![experimental](http://badges.github.io/stability-badges/dist/experimental.svg)](http://github.com/badges/stability-badges)\n\n## Information\n\nThis gulp plugin will check all img tags with an external svg and replace the tag with inline svg.\n\n[![NPM](https://nodei.co/npm/gulp-inject-svg.png?downloads=true\u0026downloadRank=true\u0026stars=true)](https://nodei.co/npm/gulp-inject-svg/)\n\n## Usage\n\n```html\n\u003cdiv class=\"icon\"\u003e\n  \u003cimg src=\"/assets/img/icons/exclamation_mark.svg\" class=\"icon--exclamation-mark\"\u003e\n\u003c/div\u003e\n```\n\n#### Note\n\nYou either need to use an absolute path relative to your project root\n\n`/src/assets/img/icons/exclamation_mark.svg`\n\nor pass a configuration object to the plugin\n\n`injectSvg({ base: '/src' })`\n\n#### Ignore some SVG files\n\nYou can prevent some SVG files from inject by the attribute `data-skip-inject-svg`\n\n```html\n\u003cimg src=\"/assets/img/icons/exclamation_mark.svg\" data-skip-inject-svg class=\"icon--exclamation-mark\"\u003e\n```\n\n#### Example\n\n```javascript\nvar gulp = require('gulp');\nvar injectSvg = require('gulp-inject-svg');\nvar injectSvgOptions = { base: '/src' };\n\ngulp.task('injectSvg', function() {\n\n  return gulp.src('/src/**/*.html')\n    .pipe(injectSvg(injectSvgOptions))\n    .pipe(gulp.dest('public/'));\n\n});\n\n```\n\nReplaces your \u0026lt;img\u0026gt; tags with the corresponding inlined svg file.\n\n```html\n\u003cdiv class=\"icon\"\u003e\n  \u003csvg class=\"icon--exclamation-mark\" xmlns=\"http://www.w3.org/2000/svg\" viewbox=\"0 0 32 32\"\u003e\u003cellipse class=\"st0\" cx=\"16\" cy=\"22.9\" rx=\"2.3\" ry=\"2.3\"/\u003e\u003cpath class=\"st0\" d=\"M18.6 9.8l-1.1 7.7c0 .4-.2.8-.6 1-.3.2-.6.3-.9.3h-.2c-.7-.1-1.2-.7-1.3-1.4l-1.1-7.6c-.2-1.5.8-2.8 2.3-3 1.4-.2 2.7.9 2.9 2.3v.7z\"/\u003e\u003c/svg\u003e\n\u003c/div\u003e\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fviktorlarsson%2Fgulp-inject-svg","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fviktorlarsson%2Fgulp-inject-svg","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fviktorlarsson%2Fgulp-inject-svg/lists"}