{"id":14962773,"url":"https://github.com/denisstasyev/svelte-image-loader","last_synced_at":"2025-10-14T04:03:54.027Z","repository":{"id":57375242,"uuid":"286844421","full_name":"denisstasyev/svelte-image-loader","owner":"denisstasyev","description":"A neat preloader for images :rocket:","archived":false,"fork":false,"pushed_at":"2020-08-13T21:44:24.000Z","size":6,"stargazers_count":5,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-10-05T01:22:28.529Z","etag":null,"topics":["action","image","loading","svelte","svelte3"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","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/denisstasyev.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-08-11T20:45:02.000Z","updated_at":"2023-03-04T03:39:16.000Z","dependencies_parsed_at":"2022-09-05T13:21:12.893Z","dependency_job_id":null,"html_url":"https://github.com/denisstasyev/svelte-image-loader","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/denisstasyev/svelte-image-loader","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/denisstasyev%2Fsvelte-image-loader","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/denisstasyev%2Fsvelte-image-loader/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/denisstasyev%2Fsvelte-image-loader/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/denisstasyev%2Fsvelte-image-loader/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/denisstasyev","download_url":"https://codeload.github.com/denisstasyev/svelte-image-loader/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/denisstasyev%2Fsvelte-image-loader/sbom","scorecard":{"id":334157,"data":{"date":"2025-08-11","repo":{"name":"github.com/denisstasyev/svelte-image-loader","commit":"c13491c68cd141d2868d5ac212e9df0485dea117"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":2.6,"checks":[{"name":"Code-Review","score":0,"reason":"Found 0/5 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":"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":"SAST","score":0,"reason":"no SAST tool detected","details":["Warn: no pull requests merged into dev branch"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"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":"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":"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":"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":"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":"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":"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":"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"}}]},"last_synced_at":"2025-08-18T04:18:45.958Z","repository_id":57375242,"created_at":"2025-08-18T04:18:45.958Z","updated_at":"2025-08-18T04:18:45.958Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279017952,"owners_count":26086179,"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-10-14T02:00:06.444Z","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":["action","image","loading","svelte","svelte3"],"created_at":"2024-09-24T13:30:29.406Z","updated_at":"2025-10-14T04:03:53.983Z","avatar_url":"https://github.com/denisstasyev.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# svelte-image-loader\n\n[![NPM version](https://img.shields.io/npm/v/svelte-image-loader.svg?style=flat)](https://www.npmjs.com/package/svelte-image-loader) [![NPM downloads](https://img.shields.io/npm/dm/svelte-image-loader.svg?style=flat)](https://www.npmjs.com/package/svelte-image-loader) [![Svelte v3](https://img.shields.io/badge/svelte-v3-blueviolet.svg)](https://svelte.dev)\n\nSvelte action to increase the level of UX by neatly preloading images (icons)\n\n![example](https://user-images.githubusercontent.com/25938785/90069131-846ea580-dcfa-11ea-9ff5-0844e65af73f.gif)\n\n## :rocket: Features\n\nThis is Svelte's action to handle the `error` and`load` events of images correctly with filling it with color.\n\n- Easy to use (an implementation through the Svelte action)\n- Light size (zero-dependencies :fire: :boom:)\n- Any custom CSS for loading/error state\n\nP.S. It's recommended to use this package only for icons (small images). If you want to achieve the best UX for middle or large images, use [svelte-skeleton](https://github.com/denisstasyev/svelte-skeleton) ([NPM package](https://www.npmjs.com/package/svelte-skeleton)).\n\n## Install\n\n```bash\nnpm i svelte-image-loader\n```\n\n## Usage\n\n```html\n\u003cscript\u003e\n  import imageLoader from 'svelte-image-loader'\n\n  ...\n\n  const src = `...`\n  const borderRadius = '50%'\n\u003c/script\u003e\n\n\u003cimg {src} alt=\"\" use:imageLoader=\"{borderRadius}\" /\u003e\n\n\u003cstyle lang=\"scss\"\u003e\n  $color-icon-secondary: #BFC1C7;\n\n  ...\n\n  :global(.svelte-image-loader) {\n  \tbackground-color: $color-icon-secondary;\n  }\n\n  ...\n\u003c/style\u003e\n```\n\nAlso you can initially call `initImageLoader` function to set custom class name (other than `.svelte-image-loader`).\n\n## API\n\n### Parameters\n\n| Name         | Type   | Default      | Description                                |\n| ------------ | ------ | ------------ | ------------------------------------------ |\n| borderRadius | string | empty string | CSS `border-radius` of loading/error state |\n\n## License\n\nMIT \u0026copy; [Denis Stasyev](https://github.com/denisstasyev)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdenisstasyev%2Fsvelte-image-loader","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdenisstasyev%2Fsvelte-image-loader","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdenisstasyev%2Fsvelte-image-loader/lists"}