{"id":16149912,"url":"https://github.com/aeyoll/postcss-imageset-type","last_synced_at":"2025-06-14T11:36:56.937Z","repository":{"id":57328119,"uuid":"413088836","full_name":"aeyoll/postcss-imageset-type","owner":"aeyoll","description":"PostCSS plugin for adding image-set type to background-images.","archived":false,"fork":false,"pushed_at":"2021-10-16T15:53:36.000Z","size":147,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-15T16:18:35.128Z","etag":null,"topics":["image-set","postcss"],"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/aeyoll.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}},"created_at":"2021-10-03T13:41:27.000Z","updated_at":"2021-10-16T15:53:34.000Z","dependencies_parsed_at":"2022-08-23T14:01:05.641Z","dependency_job_id":null,"html_url":"https://github.com/aeyoll/postcss-imageset-type","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aeyoll%2Fpostcss-imageset-type","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aeyoll%2Fpostcss-imageset-type/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aeyoll%2Fpostcss-imageset-type/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aeyoll%2Fpostcss-imageset-type/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/aeyoll","download_url":"https://codeload.github.com/aeyoll/postcss-imageset-type/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247557749,"owners_count":20958047,"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-set","postcss"],"created_at":"2024-10-10T00:45:52.105Z","updated_at":"2025-04-06T22:18:42.894Z","avatar_url":"https://github.com/aeyoll.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# PostCSS Imageset Type\n\n[PostCSS](https://github.com/postcss/postcss) plugin for adding image-set type to background-images.\n\nInput:\n\n```css\n.foo {\n  background-image: url('img/logo.jpg');\n}\n```\n\nOutput:\n\n```css\n.foo {\n  background-image: url('img/logo.jpg'); // Fallback for browser not supporting image-set\n  background-image: image-set(\n    'logo.avif' type('image/avif'),\n    'logo.webp' type('image/webp'),\n    'logo.jpg' type('image/jpeg')\n  );\n}\n```\n\n⚠ This plugin does **NOT** convert your images to avif or webp.\n\n## Usage\n\n**Step 1:** Install plugin:\n\n```sh\nnpm install --save-dev postcss postcss-imageset-type\n```\n\n**Step 2:** Check you project for existed PostCSS config: `postcss.config.js` in the project root, `\"postcss\"` section in `package.json` or `postcss` in bundle config.\n\nIf you do not use PostCSS, add it according to [official docs] and set this plugin in settings.\n\n**Step 3:** Add the plugin to plugins list:\n\n```diff\nmodule.exports = {\n  plugins: [\n+   require('postcss-imageset-type'),\n    require('autoprefixer')\n  ]\n}\n```\n\n[official docs]: https://github.com/postcss/postcss#usage\n\n\n## Settings\n\n| Option      | Default | Description                           |\n| ----------- | ------- | ------------------------------------- |\n| **useAvif** | true    | Include the avif version in image-set |\n| **useWebp** | true    | Include the webp version in image-set |\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faeyoll%2Fpostcss-imageset-type","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faeyoll%2Fpostcss-imageset-type","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faeyoll%2Fpostcss-imageset-type/lists"}