{"id":15130362,"url":"https://github.com/mttankkeo/image-encode-loader","last_synced_at":"2026-01-19T22:00:37.824Z","repository":{"id":255443018,"uuid":"851358083","full_name":"MTtankkeo/image-encode-loader","owner":"MTtankkeo","description":"This webpack loader that uses Sharp to encode images into web-friendly formats like WebP and AVIF without any external dependencies.","archived":false,"fork":false,"pushed_at":"2024-09-05T21:50:26.000Z","size":20,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-10-01T09:51:35.943Z","etag":null,"topics":["image-convert","image-encode","image-format","sharp","webpack","webpack-loader"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/image-encode-loader","language":"TypeScript","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/MTtankkeo.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-09-03T00:24:17.000Z","updated_at":"2024-09-05T21:50:29.000Z","dependencies_parsed_at":null,"dependency_job_id":"7bf8da05-594c-4848-8d64-486d1c093958","html_url":"https://github.com/MTtankkeo/image-encode-loader","commit_stats":null,"previous_names":["mttankkeo/image-encode-loader","mttankkeo/html-image-loader"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/MTtankkeo/image-encode-loader","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MTtankkeo%2Fimage-encode-loader","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MTtankkeo%2Fimage-encode-loader/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MTtankkeo%2Fimage-encode-loader/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MTtankkeo%2Fimage-encode-loader/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/MTtankkeo","download_url":"https://codeload.github.com/MTtankkeo/image-encode-loader/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MTtankkeo%2Fimage-encode-loader/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28587018,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-19T20:45:59.482Z","status":"ssl_error","status_checked_at":"2026-01-19T20:45:41.500Z","response_time":67,"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":["image-convert","image-encode","image-format","sharp","webpack","webpack-loader"],"created_at":"2024-09-26T02:46:21.431Z","updated_at":"2026-01-19T22:00:37.787Z","avatar_url":"https://github.com/MTtankkeo.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e\n  \u003cimg width=\"200px\" src=\"https://github.com/user-attachments/assets/3933881e-5d7f-4675-a4d1-1e67d7d0778e\"\u003e\n  \u003ch1\u003eImage Encode Webpack Loader\u003c/h1\u003e\n  \u003ctable\u003e\n        \u003cthead\u003e\n          \u003ctr\u003e\n            \u003cth\u003eVersion\u003c/th\u003e\n            \u003cth\u003ev1.0.0-beta3\u003c/th\u003e\n          \u003c/tr\u003e\n        \u003c/tbody\u003e\n    \u003c/table\u003e\n\u003c/div\u003e\n\n# Introduction\nThis webpack loader that uses [Sharp](https://sharp.pixelplumbing.com/) to encode images into web-friendly formats like WebP and AVIF without any external dependencies.\n\n\u003e See Also, If you want the change-log by version for this package. refer to [Change Log](CHANGELOG.md) for details.\n\n\u003e __Commonly supported formats__:\u003cbr\u003e\n\u003e webp, avif, tiff, heif, jpeg, png, gif\n\n## Install by NPM\nTo install this package in your project, enter the following command.\n\n\u003e When you want to update this package, enter `npm update image-encode-loader --save` in the terminal to run it.\n\n```\nnpm install image-encode-loader --save-dev\n```\n\n## How to apply this loader?\nThis example is based on Webpack 5. Additionally, this loader provides separate image output functionality.\n\n```cjs\nmodule.exports = {\n    module: {\n        rules: [\n            // To export the image assets files from `src/` to `dist/`.\n            // And by default, extensions are typical extensions supported by Chrome.\n            {\n                test: /\\.(png|jpe?g|webp|avif|hei[cf]|gif|tiff)$/i,\n                use: [{\n                    loader: \"image-encode-loader\",\n                    options: {\n                        // This format has the best compression rate at the moment.\n                        format: \"avif\",\n                        generator: {\n                            filename: \"images/[name].[ext]\"\n                        }\n                    }\n                }],\n            }\n        ]\n    },\n}\n```\n\n## Usage\nTo get the final compiled path of an image in JS/JSX, the image should be imported as a module.\n\n```jsx\nimport imagePath from \"../asset/images/example.png\";\n\nfunction Example() {\n    return \u003cimg src={imagePath} /\u003e\n}\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmttankkeo%2Fimage-encode-loader","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmttankkeo%2Fimage-encode-loader","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmttankkeo%2Fimage-encode-loader/lists"}