{"id":13509012,"url":"https://github.com/ccforward/progressive-image","last_synced_at":"2025-04-04T12:10:37.510Z","repository":{"id":50311343,"uuid":"85716680","full_name":"ccforward/progressive-image","owner":"ccforward","description":"A progressive-image module for Vanilla JavaScript and Vue 1.0+ \u0026 2.0+","archived":false,"fork":false,"pushed_at":"2020-10-26T13:37:06.000Z","size":2645,"stargazers_count":378,"open_issues_count":13,"forks_count":41,"subscribers_count":10,"default_branch":"master","last_synced_at":"2025-03-28T11:07:50.931Z","etag":null,"topics":["lazy-load","progressive-image","vue"],"latest_commit_sha":null,"homepage":"https://ccforward.github.io/progressive-image/index.html","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/ccforward.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-03-21T15:09:35.000Z","updated_at":"2025-03-23T16:18:24.000Z","dependencies_parsed_at":"2022-09-13T05:40:14.807Z","dependency_job_id":null,"html_url":"https://github.com/ccforward/progressive-image","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ccforward%2Fprogressive-image","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ccforward%2Fprogressive-image/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ccforward%2Fprogressive-image/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ccforward%2Fprogressive-image/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ccforward","download_url":"https://codeload.github.com/ccforward/progressive-image/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247174456,"owners_count":20896078,"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","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":["lazy-load","progressive-image","vue"],"created_at":"2024-08-01T02:01:01.742Z","updated_at":"2025-04-04T12:10:37.494Z","avatar_url":"https://github.com/ccforward.png","language":"JavaScript","readme":"# progressive-image\n\nA dead simple progressive-image module for Vanilla JavaScript and Vue.js 1.0+ \u0026 2.0+\n\n![gif](https://github.com/ccforward/cc/raw/master/Blog/pic/progressive-0.gif)\n\n## GitHub\n\n[GitHub - progressive-image](https://github.com/ccforward/progressive-image)\n\n## NPM\n\n[![NPM version][npm-image]][npm-url]\n\n[NPM - progressive-image](https://www.npmjs.com/package/progressive-image)\n\n## update\n\n#### @v1.1.0\nadd the `scale` option for origin image animation\n\n## Install\n\n```shell\n$ npm install progressive-image --save\n \n$ yarn add progressive-image\n```\n\n## For Vanilla JS\n\n### demo\n\n[progressive-image-demo](https://ccforward.github.io/progressive-image/index.html)\n\n[progressive-image-vue-demo](https://ccforward.github.io/progressive-image/example/demo-vue.html)\n\n### Usage\n\n#### import css\n```html\n\u003clink href=\"./node_modules/progressive-image/dist/index.css\" rel=\"stylesheet\" type=\"text/css\"\u003e\n```\n\nor\n\n```html\n\u003clink href=\"//unpkg.com/progressive-image/dist/index.css\" rel=\"stylesheet\" type=\"text/css\"\u003e\n```\n\n#### HTML\n\n```html\n\u003cmain id=\"app\"\u003e\n  \u003cdiv class=\"progressive\"\u003e\n    \u003cimg class=\"preview lazy\" data-src=\"http://7xiblh.com1.z0.glb.clouddn.com/progressive/1.jpg\" src=\"http://7xiblh.com1.z0.glb.clouddn.com/progressive/r1.jpg\" /\u003e\n  \u003c/div\u003e\n  \u003cdiv class=\"progressive\"\u003e\n    \u003cimg class=\"preview lazy\" data-src=\"http://7xiblh.com1.z0.glb.clouddn.com/progressive/2.jpg\" src=\"http://7xiblh.com1.z0.glb.clouddn.com/progressive/r2.jpg\" /\u003e\n  \u003c/div\u003e\n\u003c/main\u003e\n\u003cscript src=\"./dist/index.js\"\u003e\u003c/script\u003e\n```\n\n#### JS\n\n```js\n(function(){\n  new Progressive({\n    el: '#app',\n    lazyClass: 'lazy',\n    removePreview: true\n    scale: true\n  }).fire()\n})()\n\n```\n\n## For Vue.js\n\n#### import css\n```html\n\u003clink href=\"./node_modules/progressive-image/dist/index.css\" rel=\"stylesheet\" type=\"text/css\"\u003e\n```\n\nor\n\n```html\n\u003clink href=\"//unpkg.com/progressive-image/dist/index.css\" rel=\"stylesheet\" type=\"text/css\"\u003e\n```\n\n#### HTML\n\n```html\n\u003cmain id=\"app\"\u003e\n  \u003ctemplate v-for=\"item in imgs\"\u003e\n    \u003cdiv class=\"space\"\u003e\u003c/div\u003e\n    \u003cdiv class=\"progressive\"\u003e\n      \u003cimg class=\"preview\" v-progressive=\"item.src\" :data-srcset=\"item.srcset\" :src=\"item.preview\" /\u003e\n    \u003c/div\u003e\n  \u003c/template\u003e\n\u003c/main\u003e\n```\n\n#### JS\n\n```js\nimport Vue from 'vue'\nimport progressive from 'progressive-image/dist/vue'\n\nVue.use(progressive, {\n  removePreview: true,\n  scale: true\n})\n\nnew Vue({\n  name: 'demo',\n  el: '#app',\n  data: {\n    imgs: [\n      {\n        src: 'http://7xiblh.com1.z0.glb.clouddn.com/progressive/2.jpg',\n        preview: 'http://7xiblh.com1.z0.glb.clouddn.com/progressive/r2.jpg'\n      },\n      {\n        src: 'http://7xiblh.com1.z0.glb.clouddn.com/progressive/3.jpg',\n        preview: 'http://7xiblh.com1.z0.glb.clouddn.com/progressive/r3.jpg'\n      }\n    ]\n  }\n})\n```\n\n\n## build\n\n#### build dist\n\n```shell\nnpm run build\n```\n\n#### build demo\n\n```shell\nnpm run demo\n```\n\n[npm-url]: https://www.npmjs.com/package/progressive-image\n[npm-image]: https://img.shields.io/npm/v/progressive-image.svg","funding_links":[],"categories":["JavaScript"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fccforward%2Fprogressive-image","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fccforward%2Fprogressive-image","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fccforward%2Fprogressive-image/lists"}