{"id":27639976,"url":"https://github.com/vadimdez/ngx-img-fallback","last_synced_at":"2025-09-21T02:15:48.142Z","repository":{"id":8936905,"uuid":"60298404","full_name":"VadimDez/ngx-img-fallback","owner":"VadimDez","description":"🖼 Load placeholder image on image error, Angular 5+","archived":false,"fork":false,"pushed_at":"2024-05-20T16:32:10.000Z","size":37750,"stargazers_count":82,"open_issues_count":5,"forks_count":11,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-09-12T02:36:22.174Z","etag":null,"topics":["angular","angular5","fallback","image","image-fallback","placeholder-image"],"latest_commit_sha":null,"homepage":"https://vadimdez.github.io/ngx-img-fallback/","language":"TypeScript","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/VadimDez.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":".github/FUNDING.yml","license":null,"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},"funding":{"custom":["https://paypal.me/vadimdez"]}},"created_at":"2016-06-02T21:25:32.000Z","updated_at":"2025-09-05T09:09:21.000Z","dependencies_parsed_at":"2024-01-06T00:08:49.169Z","dependency_job_id":"30c1f42c-c49f-47c0-b427-8c733285fd1b","html_url":"https://github.com/VadimDez/ngx-img-fallback","commit_stats":{"total_commits":203,"total_committers":4,"mean_commits":50.75,"dds":0.3152709359605911,"last_synced_commit":"f1628ab1d253d1c5a5d40b50ba83e88f33733dd5"},"previous_names":["vadimdez/ng2-img-fallback"],"tags_count":21,"template":false,"template_full_name":null,"purl":"pkg:github/VadimDez/ngx-img-fallback","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/VadimDez%2Fngx-img-fallback","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/VadimDez%2Fngx-img-fallback/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/VadimDez%2Fngx-img-fallback/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/VadimDez%2Fngx-img-fallback/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/VadimDez","download_url":"https://codeload.github.com/VadimDez/ngx-img-fallback/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/VadimDez%2Fngx-img-fallback/sbom","scorecard":{"id":146920,"data":{"date":"2025-08-11","repo":{"name":"github.com/VadimDez/ngx-img-fallback","commit":"46a94a6ed6e73b3484787e53b03c38034a40e0da"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":2.3,"checks":[{"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":"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":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/main.yml:1","Info: no jobLevel write permissions found"],"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":0,"reason":"Found 0/7 approved changesets -- score normalized to 0","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":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","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":"Pinned-Dependencies","score":2,"reason":"dependency not pinned by hash detected -- score normalized to 2","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/main.yml:20: update your workflow using https://app.stepsecurity.io/secureworkflow/VadimDez/ngx-img-fallback/main.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/main.yml:22: update your workflow using https://app.stepsecurity.io/secureworkflow/VadimDez/ngx-img-fallback/main.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/main.yml:30: update your workflow using https://app.stepsecurity.io/secureworkflow/VadimDez/ngx-img-fallback/main.yml/master?enable=pin","Info:   0 out of   3 GitHub-owned GitHubAction dependencies pinned","Info:   1 out of   1 npmCommand dependencies pinned"],"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":"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":"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":"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":"License","score":0,"reason":"license file not detected","details":["Warn: project does not have a license file"],"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 25 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"}},{"name":"Vulnerabilities","score":0,"reason":"35 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GHSA-968p-4wvh-cqc8","Warn: Project is vulnerable to: GHSA-qwcr-r2fm-qrc7","Warn: Project is vulnerable to: GHSA-v6h2-p8h4-qcjw","Warn: Project is vulnerable to: GHSA-grv7-fg5c-xmjg","Warn: Project is vulnerable to: GHSA-pxg6-pf52-xh8x","Warn: Project is vulnerable to: GHSA-3xgq-45jj-v275","Warn: Project is vulnerable to: GHSA-67mh-4wv8-2f99","Warn: Project is vulnerable to: GHSA-qw6h-vgh9-j6wx","Warn: Project is vulnerable to: GHSA-fjxv-7rqg-78g4","Warn: Project is vulnerable to: GHSA-c7qv-q95q-8v27","Warn: Project is vulnerable to: GHSA-4www-5p9h-95mh","Warn: Project is vulnerable to: GHSA-9gqv-wp59-fq42","Warn: Project is vulnerable to: GHSA-952p-6rrq-rcjv","Warn: Project is vulnerable to: GHSA-mwcw-c2x4-8c55","Warn: Project is vulnerable to: GHSA-76c9-3jph-rj3q","Warn: Project is vulnerable to: GHSA-9wv6-86v2-598j","Warn: Project is vulnerable to: GHSA-rhx6-c78j-4q9w","Warn: Project is vulnerable to: GHSA-gcx4-mw62-g8wm","Warn: Project is vulnerable to: GHSA-m6fv-jmcg-4jfg","Warn: Project is vulnerable to: GHSA-cm22-4g7w-348p","Warn: Project is vulnerable to: GHSA-52f5-9888-hmc6","Warn: Project is vulnerable to: GHSA-c76h-2ccp-4975","Warn: Project is vulnerable to: GHSA-cxrh-j4jr-qwg3","Warn: Project is vulnerable to: GHSA-64vr-g452-qvp3","Warn: Project is vulnerable to: GHSA-9cwx-2883-4wfx","Warn: Project is vulnerable to: GHSA-vg6x-rcgg-rjx6","Warn: Project is vulnerable to: GHSA-x574-m823-4x7w","Warn: Project is vulnerable to: GHSA-4r4m-qw57-chr8","Warn: Project is vulnerable to: GHSA-xcj6-pq6g-qj4x","Warn: Project is vulnerable to: GHSA-356w-63v5-8wf4","Warn: Project is vulnerable to: GHSA-859w-5945-r5v3","Warn: Project is vulnerable to: GHSA-4vvj-4cpr-p986","Warn: Project is vulnerable to: GHSA-4v9v-hfq4-rm2v","Warn: Project is vulnerable to: GHSA-9jgg-88mc-972h","Warn: Project is vulnerable to: GHSA-3h5v-q93c-6h6q"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-16T09:34:28.501Z","repository_id":8936905,"created_at":"2025-08-16T09:34:28.501Z","updated_at":"2025-08-16T09:34:28.501Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":276183775,"owners_count":25599223,"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-09-21T02:00:07.055Z","response_time":72,"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":["angular","angular5","fallback","image","image-fallback","placeholder-image"],"created_at":"2025-04-23T22:37:14.993Z","updated_at":"2025-09-21T02:15:48.105Z","avatar_url":"https://github.com/VadimDez.png","language":"TypeScript","funding_links":["https://paypal.me/vadimdez","https://www.paypal.me/vadimdez"],"categories":[],"sub_categories":[],"readme":"\u003ch1 align=\"center\"\u003eAngular 5+ Image Fallback\u003c/h1\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://www.npmjs.com/package/ngx-img-fallback\"\u003e\n    \u003cimg src=\"https://img.shields.io/npm/dm/ngx-img-fallback.svg?style=flat\" alt=\"downloads\"\u003e\n  \u003c/a\u003e\n  \n  \u003ca href=\"https://www.npmjs.com/package/ng2-img-fallback\"\u003e\n    \u003cimg src=\"https://badge.fury.io/js/ng2-img-fallback.svg\" alt=\"downloads\"\u003e\n  \u003c/a\u003e\n  \n  \u003ca href=\"https://www.paypal.me/vadimdez\"\u003e\n    \u003cimg src=\"https://img.shields.io/badge/paypal-donate-yellow.svg\" alt=\"downloads\"\u003e\n  \u003c/a\u003e\n\u003c/p\u003e\n\n\u003e Load placeholder image on image error\n\nAngular 5+ directive that loads placeholder image on primary image error.\n\n### Demo page\n\n[Demo page](https://vadimdez.github.io/ngx-img-fallback/)\n\n### Stackblitz Example\n\n[https://stackblitz.com/edit/ngx-img-fallback](https://stackblitz.com/edit/ngx-img-fallback)\n\n## Install\n\n```\nnpm install  ngx-img-fallback --save\n```\n\n*For Angular 2+ use version `1.2.0`*\n\n## Usage\n\n*In case you're using ```SystemJS``` see configuration [here](https://github.com/VadimDez/ngx-img-fallback/blob/master/SYSTEMJS.md)*\n\n\nAdd module to your module's ```imports```\n\n```typescript\nimport { NgModule } from '@angular/core';\nimport { BrowserModule  } from '@angular/platform-browser';\nimport { AppComponent } from './app';\n \nimport { ImgFallbackModule } from 'ngx-img-fallback';\n \n\n@NgModule({\n  imports: [\n    BrowserModule, \n    ImgFallbackModule\n  ],\n  declarations: [AppComponent],\n  bootstrap: [AppComponent]\n})\nexport class AppModule {}\n```\n\nUse it in you component\n\n```typescript\nimport { Component } from '@angular/core';\n\n@Component({\n  selector: 'example-app',\n  template: '\u003cimg src=\"some_img.png\" src-fallback=\"{{ placeholder }}\"\u003e'\n})\nexport class AppComponent {\n  placeholder = 'http://placehold.it/200x200';\n}\n\n```\n\nSee also [example](https://github.com/VadimDez/ngx-img-fallback/tree/master/example) or [demo page](https://vadimdez.github.io/ngx-img-fallback/)\n\n## Events\n\n#### `(loaded)`\n\n`ngx-img-fallback` provides `(loaded)` event which is fired when either `src` or `src-fallback` is loaded.\nTo determinate whether original source or fallback is loaded - add a param to your callback for the `(loaded)` event.\n \nExample:\n\nFirst add callback to your component\n\n```typescript\nonLoaded(isFallback: boolean) {\n  // make somthing based on 'isFallback'\n}\n```\nand then bind it to the `loaded` event\n\n```html\n\u003cimg src=\"picture1.png\" src-fallback=\"picture2.png\" (loaded)=\"onLoaded($event)\"\u003e \n```\n\n## License\n\n[MIT](https://tldrlegal.com/license/mit-license) © [Vadym Yatsyuk](https://github.com/vadimdez)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvadimdez%2Fngx-img-fallback","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvadimdez%2Fngx-img-fallback","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvadimdez%2Fngx-img-fallback/lists"}