{"id":20836322,"url":"https://github.com/igrigorik/webp-detect","last_synced_at":"2025-10-15T20:36:11.524Z","repository":{"id":7316471,"uuid":"8634811","full_name":"igrigorik/webp-detect","owner":"igrigorik","description":"WebP with Accept negotiation","archived":false,"fork":false,"pushed_at":"2018-10-05T18:12:44.000Z","size":14,"stargazers_count":244,"open_issues_count":0,"forks_count":22,"subscribers_count":22,"default_branch":"master","last_synced_at":"2025-05-06T21:36:32.037Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"http://www.igvita.com/2013/05/01/deploying-webp-via-accept-content-negotiation/","language":"C++","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/igrigorik.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":"2013-03-07T19:27:32.000Z","updated_at":"2024-11-30T17:14:34.000Z","dependencies_parsed_at":"2022-09-22T12:33:37.180Z","dependency_job_id":null,"html_url":"https://github.com/igrigorik/webp-detect","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/igrigorik/webp-detect","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/igrigorik%2Fwebp-detect","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/igrigorik%2Fwebp-detect/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/igrigorik%2Fwebp-detect/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/igrigorik%2Fwebp-detect/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/igrigorik","download_url":"https://codeload.github.com/igrigorik/webp-detect/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/igrigorik%2Fwebp-detect/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279111502,"owners_count":26106043,"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","status":"online","status_checked_at":"2025-10-15T02:00:07.814Z","response_time":56,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":[],"created_at":"2024-11-18T00:29:32.967Z","updated_at":"2025-10-15T20:36:11.504Z","avatar_url":"https://github.com/igrigorik.png","language":"C++","readme":"# WebP with Accept negotiation\n\nA collection of configuration scripts for serving WebP assets:\n\n- Check if the client advertises \"image/webp\" in Accept header\n- If WebP is supported, check if the local WebP file is on disk, and serve it\n- If server is configured as proxy, append a \"WebP: true\" header and forward to backend\n- Append \"Vary: Accept\" to the client response\n\nAbove sequence of steps allows [transparent Accept negotiation of WebP assets](http://www.igvita.com/2013/05/01/deploying-webp-via-accept-content-negotiation/) - no need to modify your existing applications. Either pregenerate the WebP files, or serve WebP files dynamically to approriate clients.\n\n## Getting started\n\nDownload or copy the configuration file and run your server. For example:\n\n```\n$\u003e nginx -c /path-to/webp-detect/nginx.conf\n$\u003e varnishd -a :8081 -T localhost:6082 -F -f varnish.vcl\n```\n\nWith the above in place, access the page and look at the request header appended by the server - you will see a new `WebP` header sent to your application server if the browser supports WebP.\n\n### What about server X?\n\n* See list of included server configurations above.\n* Connect middleware (node.js): https://github.com/msemenistyi/connect-image-optimus\n* ... please send a pull request!\n","funding_links":[],"categories":["Webserver modules","Web server Modules","Webserver Modules"],"sub_categories":["Meetups"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Figrigorik%2Fwebp-detect","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Figrigorik%2Fwebp-detect","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Figrigorik%2Fwebp-detect/lists"}