{"id":21500505,"url":"https://github.com/node-libraries/wasm-webp-encoder","last_synced_at":"2025-07-15T22:31:45.166Z","repository":{"id":57131517,"uuid":"433037993","full_name":"node-libraries/wasm-webp-encoder","owner":"node-libraries","description":null,"archived":false,"fork":false,"pushed_at":"2024-02-14T12:57:00.000Z","size":65,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-03-15T13:22:17.780Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","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/node-libraries.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":"2021-11-29T12:41:46.000Z","updated_at":"2024-01-23T08:49:59.000Z","dependencies_parsed_at":"2022-08-31T20:00:54.220Z","dependency_job_id":null,"html_url":"https://github.com/node-libraries/wasm-webp-encoder","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/node-libraries%2Fwasm-webp-encoder","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/node-libraries%2Fwasm-webp-encoder/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/node-libraries%2Fwasm-webp-encoder/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/node-libraries%2Fwasm-webp-encoder/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/node-libraries","download_url":"https://codeload.github.com/node-libraries/wasm-webp-encoder/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":226077594,"owners_count":17570163,"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":[],"created_at":"2024-11-23T17:41:57.906Z","updated_at":"2024-11-23T17:41:58.923Z","avatar_url":"https://github.com/node-libraries.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# @node-libraries/wasm-webp-encoder\n\n# Overview\n\nProvides the ability to encode WebP using WebAssembly and WebWorker.\n\nRemix(esbuild) and Next.js(webpack) are supported.\n\n# types\n\n```ts\nencode(params:{data: BufferSource, width: number, height: number, quality?: number}): Promise\u003cUint8Array | null\u003e\n```\n\n```ts\nencode(params:{data: ImageData, quality?: number}): Promise\u003cUint8Array | null\u003e\n```\n\n# usage\n\n```ts\nimport { encode } from '@node-libraries/wasm-webp-encoder';\n\n// Next.js(webpack)\nconst encodedValue = await encode({ data: ctx.getImageData(0, 0, img.width, img.height) });\nconst encodedValue2 = await encode({ data: arrayBuffer, width, height });\n\n// Remix(esbuild)\n// Files need to be installed manually\n// node_modules/@node-libraries/wasm-webp-encoder/dist  =\u003e\n//   public/webp/worker.js\n//   public/webp/webp.js\n//   public/webp/webp.wasm\nconst encodedValue3 = await encode({ data: arrayBuffer, width, height, worker: '/webp/worker.js' });\n```\n\n# Sample when used with Next.js\n\n- https://github.com/SoraKumo001/next-webp\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnode-libraries%2Fwasm-webp-encoder","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnode-libraries%2Fwasm-webp-encoder","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnode-libraries%2Fwasm-webp-encoder/lists"}