{"id":13396758,"url":"https://github.com/lovell/sharp","last_synced_at":"2026-04-19T22:16:20.601Z","repository":{"id":10149290,"uuid":"12226786","full_name":"lovell/sharp","owner":"lovell","description":"High performance Node.js image processing, the fastest module to resize JPEG, PNG, WebP, AVIF and TIFF images. Uses the libvips library.","archived":false,"fork":false,"pushed_at":"2026-04-17T14:28:40.000Z","size":59953,"stargazers_count":32151,"open_issues_count":122,"forks_count":1398,"subscribers_count":227,"default_branch":"main","last_synced_at":"2026-04-18T21:33:13.428Z","etag":null,"topics":["avif","crop","exif","icc","image","image-processing","javascript","jpeg","libvips","nodejs","performance","png","resize","sharp","svg","tiff","webp"],"latest_commit_sha":null,"homepage":"https://sharp.pixelplumbing.com","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/lovell.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":".github/CONTRIBUTING.md","funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":".github/SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null},"funding":{"open_collective":"libvips"}},"created_at":"2013-08-19T20:24:24.000Z","updated_at":"2026-04-18T20:15:00.000Z","dependencies_parsed_at":"2025-12-24T13:03:23.556Z","dependency_job_id":null,"html_url":"https://github.com/lovell/sharp","commit_stats":{"total_commits":2101,"total_committers":218,"mean_commits":9.637614678899082,"dds":0.1556401713469776,"last_synced_commit":"1533bf995acda779313fc178d2b9d46791349961"},"previous_names":[],"tags_count":187,"template":false,"template_full_name":null,"purl":"pkg:github/lovell/sharp","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lovell%2Fsharp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lovell%2Fsharp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lovell%2Fsharp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lovell%2Fsharp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lovell","download_url":"https://codeload.github.com/lovell/sharp/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lovell%2Fsharp/sbom","scorecard":{"id":194317,"data":{"date":"2025-08-11","repo":{"name":"github.com/lovell/sharp","commit":"51d1a49abceb224d8e9d7122f54819904109d581"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":6.6,"checks":[{"name":"Maintained","score":10,"reason":"30 commit(s) and 22 issue activity found in the last 90 days -- score normalized to 10","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":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","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":"Code-Review","score":0,"reason":"Found 2/30 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":"Security-Policy","score":10,"reason":"security policy file detected","details":["Info: security policy file detected: .github/SECURITY.md:1","Info: Found linked content: .github/SECURITY.md:1","Info: Found disclosure, vulnerability, and/or timelines in security policy: .github/SECURITY.md:1","Info: Found text in security policy: .github/SECURITY.md:1"],"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":"Token-Permissions","score":10,"reason":"GitHub workflow tokens follow principle of least privilege","details":["Info: jobLevel 'contents' permission set to 'read': .github/workflows/ci.yml:9","Info: jobLevel 'contents' permission set to 'read': .github/workflows/ci.yml:174","Info: jobLevel 'contents' permission set to 'read': .github/workflows/ci.yml:218","Info: jobLevel 'contents' permission set to 'read': .github/workflows/ci.yml:269","Warn: jobLevel 'contents' permission set to 'write': .github/workflows/ci.yml:302","Info: found token with 'none' permissions: .github/workflows/ci.yml:1","Info: found token with 'none' permissions: .github/workflows/npm.yml:1"],"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":"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":"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":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: Apache License 2.0: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"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":"Fuzzing","score":10,"reason":"project is fuzzed","details":["Info: OSSFuzz integration found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"Branch-Protection","score":-1,"reason":"internal error: error during branchesHandler.setup: internal error: githubv4.Query: Resource not accessible by integration","details":null,"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":"Signed-Releases","score":0,"reason":"Project has not signed or included provenance with any releases.","details":["Warn: release artifact v0.34.4-rc.1 not signed: https://api.github.com/repos/lovell/sharp/releases/235646050","Warn: release artifact v0.34.4-rc.0 not signed: https://api.github.com/repos/lovell/sharp/releases/235119355","Warn: release artifact v0.34.3 not signed: https://api.github.com/repos/lovell/sharp/releases/231366369","Warn: release artifact v0.34.3-rc.1 not signed: https://api.github.com/repos/lovell/sharp/releases/231265574","Warn: release artifact v0.34.3-rc.0 not signed: https://api.github.com/repos/lovell/sharp/releases/225359334","Warn: release artifact v0.34.4-rc.1 does not have provenance: https://api.github.com/repos/lovell/sharp/releases/235646050","Warn: release artifact v0.34.4-rc.0 does not have provenance: https://api.github.com/repos/lovell/sharp/releases/235119355","Warn: release artifact v0.34.3 does not have provenance: https://api.github.com/repos/lovell/sharp/releases/231366369","Warn: release artifact v0.34.3-rc.1 does not have provenance: https://api.github.com/repos/lovell/sharp/releases/231265574","Warn: release artifact v0.34.3-rc.0 does not have provenance: https://api.github.com/repos/lovell/sharp/releases/225359334"],"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:148: update your workflow using https://app.stepsecurity.io/secureworkflow/lovell/sharp/ci.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:153: update your workflow using https://app.stepsecurity.io/secureworkflow/lovell/sharp/ci.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:157: update your workflow using https://app.stepsecurity.io/secureworkflow/lovell/sharp/ci.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:165: update your workflow using https://app.stepsecurity.io/secureworkflow/lovell/sharp/ci.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:201: update your workflow using https://app.stepsecurity.io/secureworkflow/lovell/sharp/ci.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:209: update your workflow using https://app.stepsecurity.io/secureworkflow/lovell/sharp/ci.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:247: update your workflow using https://app.stepsecurity.io/secureworkflow/lovell/sharp/ci.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/ci.yml:248: update your workflow using https://app.stepsecurity.io/secureworkflow/lovell/sharp/ci.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:261: update your workflow using https://app.stepsecurity.io/secureworkflow/lovell/sharp/ci.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:274: update your workflow using https://app.stepsecurity.io/secureworkflow/lovell/sharp/ci.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:278: update your workflow using https://app.stepsecurity.io/secureworkflow/lovell/sharp/ci.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:294: update your workflow using https://app.stepsecurity.io/secureworkflow/lovell/sharp/ci.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:310: update your workflow using https://app.stepsecurity.io/secureworkflow/lovell/sharp/ci.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:311: update your workflow using https://app.stepsecurity.io/secureworkflow/lovell/sharp/ci.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:316: update your workflow using https://app.stepsecurity.io/secureworkflow/lovell/sharp/ci.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/ci.yml:325: update your workflow using https://app.stepsecurity.io/secureworkflow/lovell/sharp/ci.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/npm.yml:99: update your workflow using https://app.stepsecurity.io/secureworkflow/lovell/sharp/npm.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/npm.yml:104: update your workflow using https://app.stepsecurity.io/secureworkflow/lovell/sharp/npm.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/npm.yml:109: update your workflow using https://app.stepsecurity.io/secureworkflow/lovell/sharp/npm.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/npm.yml:114: update your workflow using https://app.stepsecurity.io/secureworkflow/lovell/sharp/npm.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/npm.yml:120: update your workflow using https://app.stepsecurity.io/secureworkflow/lovell/sharp/npm.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/npm.yml:125: update your workflow using https://app.stepsecurity.io/secureworkflow/lovell/sharp/npm.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/npm.yml:136: update your workflow using https://app.stepsecurity.io/secureworkflow/lovell/sharp/npm.yml/main?enable=pin","Warn: containerImage not pinned by hash: test/bench/Dockerfile:1: pin your Docker image by updating ubuntu:25.04 to ubuntu:25.04@sha256:95a416ad2446813278ec13b7efdeb551190c94e12028707dd7525632d3cec0d1","Warn: npmCommand not pinned by hash: test/bench/Dockerfile:18","Warn: npmCommand not pinned by hash: test/bench/Dockerfile:21","Warn: npmCommand not pinned by hash: .github/workflows/ci.yml:160","Warn: npmCommand not pinned by hash: .github/workflows/ci.yml:204","Warn: npmCommand not pinned by hash: .github/workflows/npm.yml:147","Info:   0 out of  16 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   7 third-party GitHubAction dependencies pinned","Info:   0 out of   1 containerImage dependencies pinned","Info:   0 out of   5 npmCommand dependencies pinned"],"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":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 2 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"}}]},"last_synced_at":"2025-08-16T21:32:19.987Z","repository_id":10149290,"created_at":"2025-08-16T21:32:19.987Z","updated_at":"2025-08-16T21:32:19.987Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32024251,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-18T20:23:30.271Z","status":"online","status_checked_at":"2026-04-19T02:00:07.110Z","response_time":55,"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":["avif","crop","exif","icc","image","image-processing","javascript","jpeg","libvips","nodejs","performance","png","resize","sharp","svg","tiff","webp"],"created_at":"2024-07-30T18:01:02.184Z","updated_at":"2026-04-19T22:16:20.563Z","avatar_url":"https://github.com/lovell.png","language":"JavaScript","readme":"# sharp\n\n\u003cimg src=\"https://sharp.pixelplumbing.com/sharp-logo.svg\" width=\"160\" height=\"160\" alt=\"sharp logo\" align=\"right\"\u003e\n\nThe typical use case for this high speed Node-API module\nis to convert large images in common formats to\nsmaller, web-friendly JPEG, PNG, WebP, GIF and AVIF images of varying dimensions.\n\nIt can be used with all JavaScript runtimes\nthat provide support for Node-API v9, including\nNode.js (^18.17.0 or \u003e= 20.3.0), Deno and Bun.\n\nResizing an image is typically 4x-5x faster than using the\nquickest ImageMagick and GraphicsMagick settings\ndue to its use of [libvips](https://github.com/libvips/libvips).\n\nColour spaces, embedded ICC profiles and alpha transparency channels are all handled correctly.\nLanczos resampling ensures quality is not sacrificed for speed.\n\nAs well as image resizing, operations such as\nrotation, extraction, compositing and gamma correction are available.\n\nMost modern macOS, Windows and Linux systems\ndo not require any additional install or runtime dependencies.\n\n## Documentation\n\nVisit [sharp.pixelplumbing.com](https://sharp.pixelplumbing.com/) for complete\n[installation instructions](https://sharp.pixelplumbing.com/install),\n[API documentation](https://sharp.pixelplumbing.com/api-constructor),\n[benchmark tests](https://sharp.pixelplumbing.com/performance) and\n[changelog](https://sharp.pixelplumbing.com/changelog).\n\n## Examples\n\n```sh\nnpm install sharp\n```\n\n```javascript\nconst sharp = require('sharp');\n```\n\n### Callback\n\n```javascript\nsharp(inputBuffer)\n  .resize(320, 240)\n  .toFile('output.webp', (err, info) =\u003e { ... });\n```\n\n### Promise\n\n```javascript\nsharp('input.jpg')\n  .rotate()\n  .resize(200)\n  .jpeg({ mozjpeg: true })\n  .toBuffer()\n  .then( data =\u003e { ... })\n  .catch( err =\u003e { ... });\n```\n\n### Async/await\n\n```javascript\nconst semiTransparentRedPng = await sharp({\n  create: {\n    width: 48,\n    height: 48,\n    channels: 4,\n    background: { r: 255, g: 0, b: 0, alpha: 0.5 }\n  }\n})\n  .png()\n  .toBuffer();\n```\n\n### Stream\n\n```javascript\nconst roundedCorners = Buffer.from(\n  '\u003csvg\u003e\u003crect x=\"0\" y=\"0\" width=\"200\" height=\"200\" rx=\"50\" ry=\"50\"/\u003e\u003c/svg\u003e'\n);\n\nconst roundedCornerResizer =\n  sharp()\n    .resize(200, 200)\n    .composite([{\n      input: roundedCorners,\n      blend: 'dest-in'\n    }])\n    .png();\n\nreadableStream\n  .pipe(roundedCornerResizer)\n  .pipe(writableStream);\n```\n\n## Contributing\n\nA [guide for contributors](https://github.com/lovell/sharp/blob/main/.github/CONTRIBUTING.md)\ncovers reporting bugs, requesting features and submitting code changes.\n\n## Licensing\n\nCopyright 2013 Lovell Fuller and others.\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n[https://www.apache.org/licenses/LICENSE-2.0](https://www.apache.org/licenses/LICENSE-2.0)\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n","funding_links":["https://opencollective.com/libvips"],"categories":["图片","JavaScript","Packages","Uncategorized","Repository","Web 后端","GIT 仓库","包","目录","前端开发框架及项目","image-processing","Image Optimizers","Image","Images","Programming Languages","Framework agnostic packages","nodejs","node.js/javascript"],"sub_categories":["Image","Uncategorized","图像、图片处理","图像","图像处理","其他_文本生成、文本对话","Meetups","JavaScript","Media and Images","collection"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flovell%2Fsharp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flovell%2Fsharp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flovell%2Fsharp/lists"}