{"id":27078993,"url":"https://github.com/netlogix/nlxwebpoptimizer","last_synced_at":"2025-04-06T01:20:25.322Z","repository":{"id":59315797,"uuid":"536476549","full_name":"netlogix/nlxwebpoptimizer","owner":"netlogix","description":"Plugin to automatically generate webp variants of the media assets","archived":false,"fork":false,"pushed_at":"2023-06-21T07:04:30.000Z","size":36,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"main","last_synced_at":"2024-09-17T16:35:26.791Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/netlogix.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}},"created_at":"2022-09-14T08:10:03.000Z","updated_at":"2022-09-14T13:20:39.000Z","dependencies_parsed_at":"2022-09-21T05:45:12.422Z","dependency_job_id":null,"html_url":"https://github.com/netlogix/nlxwebpoptimizer","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/netlogix%2Fnlxwebpoptimizer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/netlogix%2Fnlxwebpoptimizer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/netlogix%2Fnlxwebpoptimizer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/netlogix%2Fnlxwebpoptimizer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/netlogix","download_url":"https://codeload.github.com/netlogix/nlxwebpoptimizer/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247421105,"owners_count":20936231,"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":[],"created_at":"2025-04-06T01:20:24.650Z","updated_at":"2025-04-06T01:20:25.292Z","avatar_url":"https://github.com/netlogix.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# nlxWebPOptimizer\n\n## About nlxWebPOptimizer\n\nPlugin to automatically generate webp variants of the media assets\n\n\n## Usage\n\nGenerate webp variants for existing media with this command:\n\n    bin/console nlx:webpoptimizer:optimize\n\nAdd following snippet to media/.htaccess to serve webp images\n\n    \u003cIfModule mod_rewrite.c\u003e\n    RewriteEngine on\n    \n    # Check if browser support WebP images\n    # Check if WebP replacement image exists\n    # Serve WebP image instead\n    RewriteCond %{HTTP_ACCEPT} image/webp\n    RewriteCond %{DOCUMENT_ROOT}/media/$0.webp -f\n    RewriteRule (.+)\\.(jpe?g|png)$ $0.webp [T=image/webp,E=accept:1]\n    \n    # Tell proxy to cache this file based on \"accept\" header\n    RewriteRule (.+)\\.(jpe?g|png|webp)$ - [env=POTENTIAL_WEBP_IMAGE:1]\n    Header merge vary accept env=POTENTIAL_WEBP_IMAGE\n    \n    RewriteCond %{REQUEST_FILENAME} !-f\n    RewriteRule ^(.*)$ ../shopware.php?controller=Media\u0026action=fallback [PT,L,QSA]\n    \u003c/IfModule\u003e\n\nAdd following snippet to root .htaccess to ensure proper MIME type for webp\n\n    # Ensure proper MIME type for webp\n    \u003cIfModule mod_mime.c\u003e\n        AddType image/webp webp\n    \u003c/IfModule\u003e\n\n## Running Tests\n\n### phpunit - functional\n\n    Not working at the moment because phpunit is functional testing and there is no running shopware installation.\n\n    $ vendor/bin/phpunit\n    \n### phpunit - unit\n\n    $ vendor/bin/phpunit -c phpunit_unit.xml.dist\n    \n### phpspec\n\n    $ vendor/bin/phpspec-standalone.php7.2.phar\n\n## License\n\nPlease see [License File](LICENSE) for more information.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnetlogix%2Fnlxwebpoptimizer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnetlogix%2Fnlxwebpoptimizer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnetlogix%2Fnlxwebpoptimizer/lists"}