{"id":16255475,"url":"https://github.com/vitaliy-bobrov/ionic-img-cache","last_synced_at":"2026-03-09T08:31:49.255Z","repository":{"id":57275959,"uuid":"53663236","full_name":"vitaliy-bobrov/ionic-img-cache","owner":"vitaliy-bobrov","description":"Image caching for Ionic 1.x applications.","archived":false,"fork":false,"pushed_at":"2018-12-07T00:05:47.000Z","size":4633,"stargazers_count":63,"open_issues_count":5,"forks_count":14,"subscribers_count":5,"default_branch":"master","last_synced_at":"2026-03-05T22:35:36.064Z","etag":null,"topics":["imgcache","imgcachejs","ionic","ionic-plugin"],"latest_commit_sha":null,"homepage":"","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/vitaliy-bobrov.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-11T11:41:00.000Z","updated_at":"2022-12-12T05:04:36.000Z","dependencies_parsed_at":"2022-08-25T00:10:43.525Z","dependency_job_id":null,"html_url":"https://github.com/vitaliy-bobrov/ionic-img-cache","commit_stats":null,"previous_names":[],"tags_count":17,"template":false,"template_full_name":null,"purl":"pkg:github/vitaliy-bobrov/ionic-img-cache","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vitaliy-bobrov%2Fionic-img-cache","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vitaliy-bobrov%2Fionic-img-cache/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vitaliy-bobrov%2Fionic-img-cache/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vitaliy-bobrov%2Fionic-img-cache/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/vitaliy-bobrov","download_url":"https://codeload.github.com/vitaliy-bobrov/ionic-img-cache/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vitaliy-bobrov%2Fionic-img-cache/sbom","scorecard":{"id":923975,"data":{"date":"2025-08-11","repo":{"name":"github.com/vitaliy-bobrov/ionic-img-cache","commit":"007f290429eaeb42b22700c4c2e6c67a57807f44"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":1.7,"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":"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 2/23 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":"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":"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":"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":"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":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE.md:0","Info: FSF or OSI recognized license: MIT 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 10 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":"49 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GHSA-6chw-6frg-f759","Warn: Project is vulnerable to: GHSA-v88g-cgmw-v5xw","Warn: Project is vulnerable to: GHSA-93q8-gq69-wqmw","Warn: Project is vulnerable to: GHSA-v6h2-p8h4-qcjw","Warn: Project is vulnerable to: GHSA-cwfw-4gq5-mrqx","Warn: Project is vulnerable to: GHSA-g95f-p29q-9xw4","Warn: Project is vulnerable to: GHSA-grv7-fg5c-xmjg","Warn: Project is vulnerable to: GHSA-897m-rjf5-jp39","Warn: Project is vulnerable to: GHSA-3xgq-45jj-v275","Warn: Project is vulnerable to: GHSA-gxpj-cx7g-858c","Warn: Project is vulnerable to: GHSA-w573-4hg7-7wgq","Warn: Project is vulnerable to: GHSA-4gmj-3p3h-gm8h","Warn: Project is vulnerable to: GHSA-3gx7-xhv7-5mx3","Warn: Project is vulnerable to: GHSA-qrmc-fj45-qfc2","Warn: Project is vulnerable to: GHSA-8r6j-v8pm-fqw3","Warn: Project is vulnerable to: MAL-2023-462","Warn: Project is vulnerable to: GHSA-43f8-2h32-f4cj","Warn: Project is vulnerable to: GHSA-qqgx-2p2h-9c37","Warn: Project is vulnerable to: GHSA-2pr6-76vf-7546","Warn: Project is vulnerable to: GHSA-8j8c-7jfh-h6hx","Warn: Project is vulnerable to: GHSA-6c8f-qphg-qjgp","Warn: Project is vulnerable to: GHSA-jf85-cpcp-j695","Warn: Project is vulnerable to: GHSA-p6mc-m468-83gw","Warn: Project is vulnerable to: GHSA-29mw-wpgm-hmr9","Warn: Project is vulnerable to: GHSA-35jh-r3h4-6jhm","Warn: Project is vulnerable to: GHSA-fvqr-27wr-82fm","Warn: Project is vulnerable to: GHSA-4xc9-xhrj-v574","Warn: Project is vulnerable to: GHSA-x5rq-j2xg-h7qm","Warn: Project is vulnerable to: GHSA-f9cm-qmx5-m98h","Warn: Project is vulnerable to: GHSA-7wpw-2hjm-89gp","Warn: Project is vulnerable to: GHSA-952p-6rrq-rcjv","Warn: Project is vulnerable to: GHSA-f8q6-p94x-37v3","Warn: Project is vulnerable to: GHSA-vh95-rmgr-6w4m","Warn: Project is vulnerable to: GHSA-xvch-5gv4-984h","Warn: Project is vulnerable to: GHSA-fhjf-83wg-r2j9","Warn: Project is vulnerable to: GHSA-hj48-42vr-x3v9","Warn: Project is vulnerable to: GHSA-6g33-f262-xjp4","Warn: Project is vulnerable to: GHSA-c2qf-rxjj-qqgw","Warn: Project is vulnerable to: GHSA-4g88-fppr-53pp","Warn: Project is vulnerable to: GHSA-4jqc-8m5r-9rpr","Warn: Project is vulnerable to: GHSA-3jfq-g458-7qm9","Warn: Project is vulnerable to: GHSA-r628-mhmh-qjhw","Warn: Project is vulnerable to: GHSA-9r2w-394v-53qc","Warn: Project is vulnerable to: GHSA-5955-9wpr-37jh","Warn: Project is vulnerable to: GHSA-qq89-hq3f-393p","Warn: Project is vulnerable to: GHSA-f5x3-32g6-xq36","Warn: Project is vulnerable to: GHSA-52f5-9888-hmc6","Warn: Project is vulnerable to: GHSA-c4w7-xm78-47vh","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/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-25T08:47:04.966Z","repository_id":57275959,"created_at":"2025-08-25T08:47:04.966Z","updated_at":"2025-08-25T08:47:04.966Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30287825,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-09T02:57:19.223Z","status":"ssl_error","status_checked_at":"2026-03-09T02:56:26.373Z","response_time":61,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["imgcache","imgcachejs","ionic","ionic-plugin"],"created_at":"2024-10-10T15:43:11.846Z","updated_at":"2026-03-09T08:31:49.235Z","avatar_url":"https://github.com/vitaliy-bobrov.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ionic-img-cache 🖼\n\n[![Bower version](https://badge.fury.io/bo/ionic-img-cache.svg)](https://badge.fury.io/bo/ionic-img-cache)\n[![npm version](https://badge.fury.io/js/ionic-img-cache.svg)](https://badge.fury.io/js/ionic-img-cache)\n[![npm](https://img.shields.io/npm/dt/ionic-img-cache.svg)](https://github.com/vitaliy-bobrov/ionic-img-cache)\n\n\nIonic directive to cache images or element background images on first load.\nWorking on top of [imgcache.js](https://github.com/chrisben/imgcache.js/) library.\n\nThis library works with Ionic Framework (v \u003e= 1.0), the supported platforms being:\n\n* Android\n* iOS\n* Windows Phone 8.1\n* Amazon Fire OS\n\n## Instalation\n\n* Install\n  * npm\n  `npm install --save ionic-img-cache`\n\n  * yarn\n  `yarn add ionic-img-cache`\n\n  * Bower\n  `bower install --save ionic-img-cache`\n\n* Add **imgcache.js** and **ionic-img-cache.min.js** files to your app index.html file.\n* Install required [cordova plugins](#required-cordova-plugins):\n  ```\n    cordova plugin add cordova-plugin-device\n    cordova plugin add cordova-plugin-file\n    cordova plugin add cordova-plugin-file-transfer\n  ```\n* Inject as dependency into your app, example:\n\n```javascript\n  angular.module('app', [\n      'ionic',\n      'ionicImgCache'\n    ])\n```\n\n* Edit **config.xml** file:\n  * Add `\u003caccess origin=\"*\"/\u003e`\n  * For Android add:\n  ```xml\n    \u003caccess origin=\"cdvfile://*\"/\u003e\n    \u003callow-intent href=\"cdvfile://*\"/\u003e\n    \u003cpreference name=\"AndroidPersistentFileLocation\" value=\"Compatibility\" /\u003e\n  ```\n  * For iOS add `\u003cpreference name=\"iosPersistentFileLocation\" value=\"Library\"/\u003e`\n\n### Required cordova plugins:\n\n* [Device](https://cordova.apache.org/docs/en/latest/reference/cordova-plugin-device/index.html)\n* [File](https://cordova.apache.org/docs/en/latest/reference/cordova-plugin-file/index.html)\n* [FileTransfer](https://cordova.apache.org/docs/en/latest/reference/cordova-plugin-file-transfer/index.html)\n\n## Usage\n\nJust add `ion-img-cache` attribute to `img` tag you want to cache.\n\nExample:\n  Image:\n  `\u003cimg ion-img-cache ng-src=\"{{ imagePath }}\"/\u003e`\n\n  Background image:\n  `\u003cdiv ion-img-cache-bg\u003eElement with background image set with css or ng-style\u003c/div\u003e`\n\n  Component:\n  **Note: Components are supported with angular \u003e=1.5.0, if older version used without `component` polyfill, component can't be used.**\n  `\u003cion-img-cache-component img-src=\"{{ imagePath }}\" alt=\"my fancy picture\"\u003e\u003c/\u003con-img-cache-component\u003e`\n\n## Cache service public methods:\n\nAll methods are async, wrapped into angular `$q` service.\n\n### add\nAdds file to local cache.\n\nExample:\n\n```js\nangular.module('app')\n  .controller('Ctrl', function(ionImgCacheSrv) {\n    ionImgCacheSrv.add('path/to/my/asset.jpg')\n      .then(function(path) {\n        console.log('File cached in ' + path);\n      })\n      .catch(function(err) {\n        console.error(err);\n      })\n  });\n```\n\n### get\nGets file local url if it present in cache.\n\nExample:\n\n```js\nangular.module('app')\n  .controller('Ctrl', function(ionImgCacheSrv) {\n    ionImgCacheSrv.get('path/to/my/asset.jpg')\n      .then(function(path) {\n        console.log('File found in cache ' + path);\n      })\n      .catch(function(err) {\n        console.error(err);\n      })\n  });\n```\n\n### remove\nRemoves file from local cache if it present.\n\nExample:\n\n```js\nangular.module('app')\n  .controller('Ctrl', function(ionImgCacheSrv) {\n    ionImgCacheSrv.remove('path/to/my/asset.jpg')\n      .then(function() {\n        console.log('File removed from cache');\n      })\n      .catch(function(err) {\n        console.error(err);\n      })\n  });\n```\n\n### checkCacheStatus\nChecks file cache status by url.\n\nExample:\n\n```js\nangular.module('app')\n  .controller('Ctrl', function(ionImgCacheSrv) {\n    ionImgCacheSrv.checkCacheStatus('path/to/my/asset.jpg')\n      .then(function(path) {\n        console.log('File added/found in/to cache' + path);\n      })\n      .catch(function(err) {\n        console.error(err);\n      })\n  });\n```\n\n### checkBgCacheStatus\nChecks elements background file cache status by element.\n\nExample:\n\n```js\nangular.module('app')\n  .controller('Ctrl', function(ionImgCacheSrv) {\n    ionImgCacheSrv.checkBgCacheStatus(angular.element('#my-element'))\n      .then(function(path) {\n        console.log('File added/found in/to cache' + path);\n      })\n      .catch(function(err) {\n        console.error(err);\n      })\n  });\n```\n\n### clearCache\nClears all cahced files.\n\nExample:\n\n```js\nangular.module('app')\n  .controller('Ctrl', function(ionImgCacheSrv) {\n    ionImgCacheSrv.clearCache()\n      .then(function(path) {\n        console.log('Cache successuly cleared');\n      })\n      .catch(function(err) {\n        console.error(err);\n      })\n  });\n```\n\n### getCacheSize\nGets local cache size in bytes.\n\nExample:\n\n```js\nangular.module('app')\n  .controller('Ctrl', function(ionImgCacheSrv) {\n    ionImgCacheSrv.getCacheSize()\n      .then(function(result) {\n        console.log('Cache size is ' + result + ' bytes');\n      })\n      .catch(function(err) {\n        console.error(err);\n      })\n  });\n```\n\n## Options\n\nCaching can be configured via `ionicImgCacheProvider`, there are available parameters in this provider:\n\n### debug\n\n**Type**: Boolean\n\n**Default value**: false\n\nEnables ImgCache debug mode.\n\n### quota\n\n**Type**: Number\n\n**Default value**: 50\n\nQuota for storage size available for cached images in MB.\n\n### headers\n\n**Type**: Object\n\n**Default value**: {}\n\nAdds custom request headers.\n\n### folder\n\n**Type**: String\n\n**Default value**: ion-img-cache\n\nSet name of cached files directory.\n\n### cacheClearSize\n\n**Type**: Number\n\n**Default value**: 0\n\nSet quota after which cache folder will be cleared.\n\nExample:\n\n```js\nangular.module('app')\n  .config(function(ionicImgCacheProvider) {\n    // Enable imgCache debugging.\n    ionicImgCacheProvider.debug(true);\n\n    // Set storage size quota to 100 MB.\n    ionicImgCacheProvider.quota(100);\n\n    // Set folder for cached files.\n    ionicImgCacheProvider.folder('my-cache');\n\n    // Set cache clear limit.\n    ionicImgCacheProvider.cacheClearSize(100);\n  });\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvitaliy-bobrov%2Fionic-img-cache","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvitaliy-bobrov%2Fionic-img-cache","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvitaliy-bobrov%2Fionic-img-cache/lists"}