{"id":36499483,"url":"https://github.com/turnstileweb/ngx-webp-polyfill","last_synced_at":"2026-01-12T02:17:53.071Z","repository":{"id":35206083,"uuid":"213886126","full_name":"turnstileweb/ngx-webp-polyfill","owner":"turnstileweb","description":"Webp Polyfill for Angular","archived":false,"fork":false,"pushed_at":"2025-06-29T13:48:34.000Z","size":3844,"stargazers_count":3,"open_issues_count":31,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-06-29T14:35:46.454Z","etag":null,"topics":["angular","typescript","webp-polyfill"],"latest_commit_sha":null,"homepage":null,"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/turnstileweb.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"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,"zenodo":null}},"created_at":"2019-10-09T10:15:15.000Z","updated_at":"2025-06-29T13:48:38.000Z","dependencies_parsed_at":"2025-06-29T14:38:09.263Z","dependency_job_id":null,"html_url":"https://github.com/turnstileweb/ngx-webp-polyfill","commit_stats":null,"previous_names":[],"tags_count":9,"template":false,"template_full_name":null,"purl":"pkg:github/turnstileweb/ngx-webp-polyfill","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/turnstileweb%2Fngx-webp-polyfill","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/turnstileweb%2Fngx-webp-polyfill/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/turnstileweb%2Fngx-webp-polyfill/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/turnstileweb%2Fngx-webp-polyfill/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/turnstileweb","download_url":"https://codeload.github.com/turnstileweb/ngx-webp-polyfill/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/turnstileweb%2Fngx-webp-polyfill/sbom","scorecard":{"id":902802,"data":{"date":"2025-08-18","repo":{"name":"github.com/turnstileweb/ngx-webp-polyfill","commit":"341acc013621baab5f89678efd0139f25cc36dba"},"scorecard":{"version":"v5.2.1-41-g40576783","commit":"40576783fda6698350fcbbeaea760ff827433034"},"score":1.7,"checks":[{"name":"Maintained","score":0,"reason":"1 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/40576783fda6698350fcbbeaea760ff827433034/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/40576783fda6698350fcbbeaea760ff827433034/docs/checks.md#dangerous-workflow"}},{"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/40576783fda6698350fcbbeaea760ff827433034/docs/checks.md#packaging"}},{"name":"Code-Review","score":0,"reason":"Found 0/28 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/40576783fda6698350fcbbeaea760ff827433034/docs/checks.md#code-review"}},{"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/40576783fda6698350fcbbeaea760ff827433034/docs/checks.md#binary-artifacts"}},{"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/40576783fda6698350fcbbeaea760ff827433034/docs/checks.md#token-permissions"}},{"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/40576783fda6698350fcbbeaea760ff827433034/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/40576783fda6698350fcbbeaea760ff827433034/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/40576783fda6698350fcbbeaea760ff827433034/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/40576783fda6698350fcbbeaea760ff827433034/docs/checks.md#fuzzing"}},{"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/40576783fda6698350fcbbeaea760ff827433034/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/40576783fda6698350fcbbeaea760ff827433034/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":3,"reason":"branch protection is not maximal on development and all release branches","details":["Info: 'allow deletion' disabled on branch 'master'","Info: 'force pushes' disabled on branch 'master'","Info: 'branch protection settings apply to administrators' is required to merge on branch 'master'","Warn: 'stale review dismissal' is disabled on branch 'master'","Warn: branch 'master' does not require approvers","Warn: codeowners review is not required on branch 'master'","Warn: 'last push approval' is disabled on branch 'master'","Warn: no status checks found to merge onto branch 'master'","Info: PRs are required in order to make changes on 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/40576783fda6698350fcbbeaea760ff827433034/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 6 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/40576783fda6698350fcbbeaea760ff827433034/docs/checks.md#sast"}},{"name":"Vulnerabilities","score":0,"reason":"50 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GHSA-c75v-2vq8-878f","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-ff7x-qrg7-qggm","Warn: Project is vulnerable to: GHSA-67mh-4wv8-2f99","Warn: Project is vulnerable to: GHSA-rv95-896h-c2vc","Warn: Project is vulnerable to: GHSA-qw6h-vgh9-j6wx","Warn: Project is vulnerable to: GHSA-cxjh-pqwp-8mfp","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-p8p7-x288-28g6","Warn: Project is vulnerable to: GHSA-gcx4-mw62-g8wm","Warn: Project is vulnerable to: GHSA-c2qf-rxjj-qqgw","Warn: Project is vulnerable to: GHSA-m6fv-jmcg-4jfg","Warn: Project is vulnerable to: GHSA-cm22-4g7w-348p","Warn: Project is vulnerable to: GHSA-f5x3-32g6-xq36","Warn: Project is vulnerable to: GHSA-52f5-9888-hmc6","Warn: Project is vulnerable to: GHSA-72xf-g2v4-qvf3","Warn: Project is vulnerable to: GHSA-7p7h-4mm5-852v","Warn: Project is vulnerable to: GHSA-9qxr-qj54-h672","Warn: Project is vulnerable to: GHSA-m4v8-wqvr-p9f7","Warn: Project is vulnerable to: GHSA-c76h-2ccp-4975","Warn: Project is vulnerable to: GHSA-cxrh-j4jr-qwg3","Warn: Project is vulnerable to: GHSA-8jhw-289h-jh2g","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-wr3j-pwj9-hqq6","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","Warn: Project is vulnerable to: GHSA-776f-qx25-q3cc","Warn: Project is vulnerable to: GHSA-p9pc-299p-vxgp"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/40576783fda6698350fcbbeaea760ff827433034/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-24T16:17:26.187Z","repository_id":35206083,"created_at":"2025-08-24T16:17:26.187Z","updated_at":"2025-08-24T16:17:26.187Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28331902,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-12T00:36:25.062Z","status":"online","status_checked_at":"2026-01-12T02:00:08.677Z","response_time":98,"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","typescript","webp-polyfill"],"created_at":"2026-01-12T02:17:48.001Z","updated_at":"2026-01-12T02:17:53.065Z","avatar_url":"https://github.com/turnstileweb.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Angular Webp Polyfill\n\nA Webp polyfill for Angular, using `webp-hero`. This module applies to polyfill as Angular Pipes/Directives for:\n1. Image elements\n2. Elements with a `background-image` style\n\nYou can view a demo [here](https://webp.turnstileweb.dev).\n\n## Installation\nNPM\n```\nnpm install --save ngx-webp-polyfill webp-hero p-queue\n```\n\nYarn\n```\nyarn add ngx-webp-polyfill webp-hero p-queue\n```\n\nTo allow the polyfill to be applied to images one-at-a-time (as enforced by `webp-hero`) we use `p-queue` to queue the decoding.  \n\n## Usage\n\n### Standalone\nConfigure the default and/or override providers in your `ApplicationConfig`.\n\n```\nimport { ApplicationConfig, Inject } from '@angular/core';\nimport { provideRouter } from '@angular/router';\n\nimport { externalPolyfillFactory, DEFAULT_WEBP_OPTIONS, polyfillServiceFactory, WEBP_POLYFILL, WEBP_POLYFILL_EXTERNAL, WEBP_POLYFILL_OPTIONS } from 'ngx-webp-polyfill';\n\nexport const appConfig: ApplicationConfig = {\n  providers: [\n    {\n      provide: WEBP_POLYFILL_OPTIONS,\n      useValue: DEFAULT_WEBP_OPTIONS\n    },\n    {\n      provide: WEBP_POLYFILL,\n      useFactory: polyfillServiceFactory,\n      deps: [ [new Inject(WEBP_POLYFILL_OPTIONS)], [new Inject(WEBP_POLYFILL_EXTERNAL)]]\n    },\n    {\n      provide: WEBP_POLYFILL_EXTERNAL,\n      useFactory: externalPolyfillFactory\n    }\n  ]\n};\n```\n\n### NgxWebpPolyfillModule.forRoot(options?: WebpPolyfillOptions)\nImport `NgxWebpPolyfillModule.forRoot(options?: WebpPolyfillOptions)` into `AppModule`.\n\n`WebpPolyfillOptions`\n- `applyPolyfill: (url: string) =\u003e boolean` (defaults to true) to apply the polyfill conditionally i.e. for specific browsers\n```\nimport { NgxWebpPolyfillModule } from 'ngx-webp-polyfill';\n\nexport function webpPolyfillOptions(url: string) {\n  return true;\n}\n\n@NgModule({\n  imports: [\n    NgxWebpPolyfillModule.forRoot({\n        applyPolyfill: webpPolyfillOptions\n    })\n  ]\n})\nexport class AppModule { }\n```\n\n### NgxWebpPolyfillModule.forChild()\n\nImport `NgxWebpPolyfillModule.forChild()` into your application child modules, where needed.\n\n```\nimport { NgxWebpPolyfillModule } from 'ngx-webp-polyfill';\n\n@NgModule({\n  imports: [\n    NgxWebpPolyfillModule.forChild()\n  ]\n})\nexport class MyFeatureModule { }\n```\n\n### Template example\nApply the polyfill directives in your template with the following options.\n\n##### webpImage Pipe\n```\n  \u003cimg *ngIf=\"myImageUrl | webpImage | async as imagePipeTransform\"\n       [src]=\"imagePipeTransform\"\n       alt=\"My Image\"\n       class=\"thumbnail\"/\u003e\n```\nNote: The use of `*ngIf` is required here as the `async` pipe will emit `null` as an initial value.\n\n##### webpBackground Pipe\n```\n  \u003cdiv [style.background-image]=\"'url(' + myImageUrl + ')' | webpBackground | async\"\n       style=\"width: 200px; height: 200px\"\u003e\u003c/div\u003e\n```\n\n## Contributing\n\nFork and send us a pull request. Consider discussing the change with us before committing the code. The library follows semantic versioning principles, which is automated using conventional commit messages. \n\n## Development\n\n### Running the demo and library locally using `npm link`\n1. `npm run build:library` to watch changes\n2. `cd dist/ngx-webp-polyfill \u0026\u0026 npm link \u0026\u0026 cd ../../ \u0026\u0026 npm link ngx-webp-polyfill` allows the demo application to develop against the locally built library\n3. `npm start` to start the demo application\n\n### Clean up\n1. `cd dist/ngx-webp-polyfill \u0026\u0026 npm unlink \u0026\u0026 cd ../../ \u0026\u0026 npm unlink ngx-webp-polyfill` reverts `npm link`\n\n## Committing\nTo use the interactive CLI when committing:\n\n```\n    $ git add \u003cfile/s to commit\u003e\n    $ npm run commit\n```\n\nOr use your IDE, commits messages are linted!\n\n## Release\nThese instructions are for maintainers of this library, to release a new version:\n### Package\n1. Generate new version and tag with `npm run release \u0026\u0026 git push --follow-tags origin master`\n2. Builds and package the library `npm run package:library`\n3. Publish the library to NPM `cd dist/ngx-webp-polyfill \u0026\u0026 npm publish`\n\n### Demo\n1. To build the demo run `npm run build`\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fturnstileweb%2Fngx-webp-polyfill","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fturnstileweb%2Fngx-webp-polyfill","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fturnstileweb%2Fngx-webp-polyfill/lists"}