{"id":26210784,"url":"https://github.com/dkaoster/rollup-plugin-generate-image-sizes","last_synced_at":"2025-04-15T14:12:30.988Z","repository":{"id":42628187,"uuid":"315497562","full_name":"dkaoster/rollup-plugin-generate-image-sizes","owner":"dkaoster","description":"Automatically generate multiple sizes of images using rollup.","archived":false,"fork":false,"pushed_at":"2024-08-30T14:06:34.000Z","size":604,"stargazers_count":3,"open_issues_count":3,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-28T21:02:14.270Z","etag":null,"topics":["image","resize","rollup"],"latest_commit_sha":null,"homepage":"","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/dkaoster.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-11-24T02:34:07.000Z","updated_at":"2022-01-16T04:33:22.000Z","dependencies_parsed_at":"2025-03-12T07:44:26.415Z","dependency_job_id":null,"html_url":"https://github.com/dkaoster/rollup-plugin-generate-image-sizes","commit_stats":null,"previous_names":["dkaoster/rollup-generate-image-sizes"],"tags_count":20,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dkaoster%2Frollup-plugin-generate-image-sizes","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dkaoster%2Frollup-plugin-generate-image-sizes/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dkaoster%2Frollup-plugin-generate-image-sizes/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dkaoster%2Frollup-plugin-generate-image-sizes/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dkaoster","download_url":"https://codeload.github.com/dkaoster/rollup-plugin-generate-image-sizes/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248546424,"owners_count":21122314,"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":["image","resize","rollup"],"created_at":"2025-03-12T07:34:15.888Z","updated_at":"2025-04-15T14:12:30.967Z","avatar_url":"https://github.com/dkaoster.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# rollup-plugin-generate-image-sizes\n\nUseful for when you want to automatically resize images for use in a srcset / other responsive web design implementations.\n\n## Installation\n\n```\nnpm i -D rollup-plugin-generate-image-sizes\n```\n\n## Usage\n\n```js \n// rollup.config.js\nimport { generateImageSizes } from 'rollup-plugin-generate-image-sizes';\n\nexport default {\n  plugins: [\n    generateImageSizes({\n      dir: 'static',\n      size: [1400, 1024, 640, 320],\n      hook: 'renderStart',\n      quality: 65,\n      inputFormat: ['jpg', 'jpeg', 'png'],\n      outputFormat: ['jpg'],\n      forceUpscale: false,\n      skipExisting: true,\n      maxParallel: 4,\n      outputManifest: 'static/images-manifest.json'\n    })\n  ]\n}\n```\n\nNote: All output files are named in the pattern `\u003coriginal-filename\u003e@\u003csize\u003ew.\u003cfile-extension\u003e`. The plugin looks for the `@` symbol to determine which files have already been converted, which means that all files with the `@` will be ignored. Files with `#` are also ignored.\n\n### Configuration\n`dir` (required | `string` or `[string]`) the string or array of strings specifying the directory where the images we want to resize are.\n\n`size` (default: [1400, 1024, 640, 320] | `int` or `[int]`) An integer or array of integers specifying the width in pixels of our output image.\n\n`hook` (default: renderStart) [the rollup hook](https://rollupjs.org/guide/en/#build-hooks) that this plugin should use.\n\n`quality` (default: 65 | `int`): The quality of output images, for image formats that have output quality controls.\n\n`inputFormat` (default: ['jpg', 'jpeg', 'png'] | `string` or `[string]`): The file extensions of the images we care about. Must be a format supported by [jimp](https://github.com/oliver-moran/jimp#supported-image-types), or `match`, which matches the input format of the image.\n\n`outputFormat` (default: 'jpg' | `string` or `[string]`): The file extensions of the images we want to output. Must be a format supported by [jimp](https://github.com/oliver-moran/jimp#supported-image-types) or `match`, which is used to match the input format.\n\n`forceUpscale` (default: false | `boolean`): If the source image is larger, do we want to forcibly generate a scaled up version or whether we should just ignore it.\n\n`skipExisting` (default: true | `boolean`): whether we should skip existing images that have already been resized. a false value means that images will be regenerated and overwritten every single time this script is run.\n\n`maxParallel` (default: 4 | `int`): the max number of parallel images that can be processed concurrently.\n\n`outputManifest` (default: null | `string`): the file to output a json containing all the images this plugin generated.\n\n## License\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdkaoster%2Frollup-plugin-generate-image-sizes","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdkaoster%2Frollup-plugin-generate-image-sizes","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdkaoster%2Frollup-plugin-generate-image-sizes/lists"}