{"id":15021482,"url":"https://github.com/fulme/tinypng-free","last_synced_at":"2025-08-07T14:43:51.884Z","repository":{"id":32771919,"uuid":"142156040","full_name":"fulme/tinypng-free","owner":"fulme","description":" Use the upload api of tinypng's homeage to compress images","archived":false,"fork":false,"pushed_at":"2022-11-01T22:11:45.000Z","size":275,"stargazers_count":30,"open_issues_count":6,"forks_count":4,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-07-06T00:56:28.636Z","etag":null,"topics":["compress","gulp","gulp-tinypng","imagemin","jpg","png","tinypng"],"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/fulme.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":"2018-07-24T12:34:24.000Z","updated_at":"2024-04-24T09:41:11.000Z","dependencies_parsed_at":"2022-08-08T00:00:04.971Z","dependency_job_id":null,"html_url":"https://github.com/fulme/tinypng-free","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/fulme/tinypng-free","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fulme%2Ftinypng-free","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fulme%2Ftinypng-free/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fulme%2Ftinypng-free/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fulme%2Ftinypng-free/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fulme","download_url":"https://codeload.github.com/fulme/tinypng-free/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fulme%2Ftinypng-free/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":264545256,"owners_count":23625408,"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":["compress","gulp","gulp-tinypng","imagemin","jpg","png","tinypng"],"created_at":"2024-09-24T19:56:37.683Z","updated_at":"2025-07-10T07:36:35.354Z","avatar_url":"https://github.com/fulme.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# gulp-tinypng-free\nUse the upload api of tinypng's homeage to compress images, so can use it without key.\n\n- 模拟用户上传和下载的行为，来得到压缩图片，突破使用官网api每月500张限制\n- 通过hash摘要缓存已压缩的文件，只针对有变化的文件进行压缩，避免了重复劳动，提高效率\n\n## Why\n图片是影响页面加载速度的重要因素，文本代码通常不会很大，在服务端开启`gzip`压缩可以有一个比较大的压缩率。\n但图片本身就是经过压缩的，所以`gzip`基本不会有任何作用，所以[tinypng](https://tinypng.com/)值得你拥有！\n保守估计，本插件可以压缩掉**40% ~ 50%**, 而对图片质量影响很小！\n相比而言，大家熟知的[imagemin](https://www.npmjs.com/package/gulp-imagemin)能压缩10%就不错了。\n\n\n## Install\n```\n$ npm i gulp-tinypng-free\n```\n\n## How to use\n```\nvar gulp = require('gulp');\nvar tinypngFree = require('gulp-tinypng-free');\n\ngulp.task('tinypng', function(cb) {\n    gulp.src('src/*')\n        .pipe(tinypngFree({}))\n        .pipe(gulp.dest('dist'));\n});\n```\n\n## API\n### tinypngFree([options])\n\nReturns Stream containing compressed images\n\n#### options\nType: `Object`\nDefault: `{}`\n\nSets options described below from its properties.\n\n#### options.signFile\nType: `String`\nDefault: `./sign.json`\n\nIf set to a filename, it will compare existing source file md5 signatures against those found in the file's json data. When the signatures match, the file is skipped from being minified again, allowing you to better stay within your API request limits. When an image is minified, the md5 signature is determined from the unminified source image and written to the file at options.sigFile (a suggested location would be somewhere under your source control).\n\nSignatures are based off the unminified source image, so that when the source changes it will be re-minified and re-written to the destination file.\n\n#### options.force\nType: `Boolean`\nDefault: `false`\n\nForce compress images regardless of signature. Value can either be `true` to force all images, or a glob pattern string to match against the filename(s).\n\n\n## Intro\nneed upload files, so it may be unstable.Recommand to move this to the end of task.\n\n尽量放到任务的最后一步，因为这个过程是要上传图片，再下载图片的，和网络稳定有关\n\n## Reference\nhttps://github.com/creativeaura/gulp-tinypng  \nhttps://github.com/stnvh/gulp-tinypng-compress  \nhttps://github.com/paper/gulp-tinypng-nokey  ","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffulme%2Ftinypng-free","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffulme%2Ftinypng-free","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffulme%2Ftinypng-free/lists"}