{"id":21712110,"url":"https://github.com/biosboy/webp-checker","last_synced_at":"2025-04-12T17:53:07.469Z","repository":{"id":94660029,"uuid":"203522773","full_name":"BiosBoy/webp-checker","owner":"BiosBoy","description":":octopus: Tiny util for checking browser's webP support ability. Helps to understand is that :first_quarter_moon: browser has webp support or not :bell:","archived":false,"fork":false,"pushed_at":"2019-08-23T14:51:49.000Z","size":111,"stargazers_count":3,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-26T12:21:20.495Z","etag":null,"topics":["html","webp","webp-checker","webp-images","webp-support"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/webp-checker","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/BiosBoy.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","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":"2019-08-21T06:39:24.000Z","updated_at":"2021-02-03T17:07:18.000Z","dependencies_parsed_at":"2023-04-24T00:33:11.202Z","dependency_job_id":null,"html_url":"https://github.com/BiosBoy/webp-checker","commit_stats":{"total_commits":29,"total_committers":2,"mean_commits":14.5,"dds":"0.13793103448275867","last_synced_commit":"bcf6e5ef40e22a0f64551b4f65dae5f0a0e71f4b"},"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BiosBoy%2Fwebp-checker","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BiosBoy%2Fwebp-checker/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BiosBoy%2Fwebp-checker/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BiosBoy%2Fwebp-checker/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/BiosBoy","download_url":"https://codeload.github.com/BiosBoy/webp-checker/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248610408,"owners_count":21132920,"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":["html","webp","webp-checker","webp-images","webp-support"],"created_at":"2024-11-25T23:33:56.514Z","updated_at":"2025-04-12T17:53:07.460Z","avatar_url":"https://github.com/BiosBoy.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# WebP Checker\n\n [![Tweet](https://img.shields.io/twitter/url/http/shields.io.svg?style=social)](https://twitter.com/intent/tweet?text=See\u0026url=https://github.com/BiosBoy/webp-checker\u0026via=svyat770\u0026hashtags=js,jsx,webp,checker,webp-checker,webp,html,css)\n\n### The easist way to check webp support in any browser!\n\n[![npm](https://badgen.net/npm/v/webp-checker)](https://www.npmjs.com/package/webp-checker) [![Price](https://img.shields.io/badge/price-FREE-purple.svg)](https://github.com/BiosBoy/webp-checker/blob/master/LICENSE) [![License: MIT](https://img.shields.io/badge/license-MIT-yellow.svg)](https://github.com/BiosBoy/webp-checker/blob/master/LICENSE) [![GitHub package version](https://img.shields.io/badge/version-1.1.3-green.svg)](https://github.com/BiosBoy/webp-checker) ![](https://img.badgesize.io/biosboy/webp-checker/master/index.js.svg)\n\n  \n\n![logo_image](https://raw.githubusercontent.com/BiosBoy/webp-checker/master/web-checker_logo.jpg)\n\n**How to use:**\n  - Prepare:\n   Install `webp-checker` as a regular `node_modules` package via:\n   ```\n     npm i web-checker\n   ```\n   or yarn:\n   ```\n     yarn add web-checker\n   ```\n**Important!** - you need to run `webp-checker` as soon as possible inside the very first component/module that has an interaction with the whole DOM. For example in `create-react-app` you probably should run the below script example in the `componentDidMount()` method of the root App.js component (or if you're using `Redux` state managment inside its `initialState.js`).\n\n**Quick Start:**\n\n   - So, to understand if your browser has webP support or not, basically, you need just run `webpChecker`. \n   After function running you will get a `window` variable `__WEBPSUPPORT__` (e.g. `window.__WEBPSUPPORT__`) with boolean value that shows if the webp support is `true/false`. \n   \n  -- Example for React usage:\n  ```\n    // ...some logic\n    import webpChecker from 'webp-checker' // import it;\n\n    class App extends React.Component {\n     // ...some logic\n     \n     componentDidMount() {\n         webpChecker(); // run checker\n    \n         window.__WEBSUPPORT__ // get notified about browser webp support by this global variable\n     }\n     \n     // ...some logic\n    }\n  ```\n  \n  -- Example basic:\n  ```\n     import webpChecker from 'webp-checker' // import it;\n\n     webpChecker(); // run checker\n    \n     window.__WEBSUPPORT__ // get notified about browser webp support by this global variable\n  ```\n\n**Advanced:**\n  - In case when you need to set up a better custom config you can throw props as:\n```\n  import webpChecker from 'webp-checker' // import it;\n\n  const config = {\n    imgURL: 'imgSrc', // your_webp_image_src, by default used google static image\n    disableGlobal: true, // disable global injection in 'window' object, by default 'false'\n    injectBodyClass: false, // explicitly set a 'body' class 'webp-support', by default 'true',\n    callback: status =\u003e status // some callback that you want to return with webp checker result 'true/false'\n  }\n  \n  webpChecker(config); // run checker\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbiosboy%2Fwebp-checker","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbiosboy%2Fwebp-checker","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbiosboy%2Fwebp-checker/lists"}