{"id":19664585,"url":"https://github.com/sourcebroker/webp","last_synced_at":"2025-04-28T21:33:41.980Z","repository":{"id":57056109,"uuid":"340630156","full_name":"sourcebroker/webp","owner":"sourcebroker","description":"Webp converter scenarios","archived":false,"fork":false,"pushed_at":"2021-03-11T21:31:24.000Z","size":22,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-10-21T03:03:22.403Z","etag":null,"topics":["webp"],"latest_commit_sha":null,"homepage":"","language":"PHP","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/sourcebroker.png","metadata":{"files":{"readme":"README.rst","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-02-20T10:48:08.000Z","updated_at":"2021-03-28T13:02:26.000Z","dependencies_parsed_at":"2022-08-24T02:20:06.851Z","dependency_job_id":null,"html_url":"https://github.com/sourcebroker/webp","commit_stats":null,"previous_names":[],"tags_count":10,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sourcebroker%2Fwebp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sourcebroker%2Fwebp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sourcebroker%2Fwebp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sourcebroker%2Fwebp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sourcebroker","download_url":"https://codeload.github.com/sourcebroker/webp/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":224133770,"owners_count":17261303,"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":["webp"],"created_at":"2024-11-11T16:18:17.143Z","updated_at":"2024-11-11T16:18:17.826Z","avatar_url":"https://github.com/sourcebroker.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"webp\n====\n\n.. contents:: :local:\n\nWhat does it do?\n----------------\n\nThis library is short scenarios of working examples for webp on demand which use rosell-dk/webp-convert in background.\nThere will be two scenarios:\n\n1) call to image which has no webp version yet will redirect to original source and run webp image converter in background\n2) call to image which has no webp version yet will stream original source and run webp image converter in background\n\nNext calls to jpg/png will return webp on apache rewrite level.\n\nFor now only first scenario is implemented.\n\nWebp images generated after redirect to original source\n-------------------------------------------------------\n\nHow to install ?\n++++++++++++++++\n\n1. ``composer req sourcebroker/webp``\n2. Go to folder ``vendor/sourcebroker/webp/Resources/WebpRedirectToOriginalAndConvertInBackground``\n3. Copy part of htaccess from there to your htaccess or vhost configuration.\n4. Copy the example ``webp.php`` to your DocumentRoot folder. Change the path to vendor folder to your needs.\n5. Your webp files will be stored in separate folder in your DocumentRoot folder. By default its ``_processed_/webp-images``.\n   You can change this folder by replacing ``_processed_/webp-images`` in ``.htaccess`` file and in ``webp.php`` file.\n6. If you open folder ``vendor/sourcebroker/webp/Resources/WebpRedirectToOriginalAndConvertInBackground/cms-specific`` you\n   will find there ``htaccess`` and ``webp.php`` for specific CMSes like for example TYPO3. The path to store files\n   is there selected to best fit the CMS.\n\nHow to test?\n++++++++++++\n\n1. Go into Network tab in Chrome DevTools. When you refresh website you should see jpg/png files being redirected to the\n   same url but with ``?processing`` parameter.\n2. When you refresh the page second time some jpg/png should be already converted. Those will have ``webp`` in column ``Type``\n3. Check you DocumentRoot folder there should be ``_processed_/webp-images`` folder created with webp files.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsourcebroker%2Fwebp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsourcebroker%2Fwebp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsourcebroker%2Fwebp/lists"}