{"id":50387633,"url":"https://github.com/etechflow/module-image-optimizer","last_synced_at":"2026-05-30T16:00:40.228Z","repository":{"id":359507999,"uuid":"1245282347","full_name":"etechflow/module-image-optimizer","owner":"etechflow","description":"Magento 2 server-side WebP image optimization. No external API, no per-image fees. Converts JPG/PNG/GIF locally via cwebp/Imagick/GD with graceful fallback. Emits \u003cpicture\u003e + loading=lazy. Bulk + cron + CLI. Hyvä + Luma. Standalone or in the ETechFlow Bundle.","archived":false,"fork":false,"pushed_at":"2026-05-22T06:42:10.000Z","size":79,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-05-22T14:57:53.236Z","etag":null,"topics":["core-web-vitals","ecommerce","etechflow","hyva","hyva-compatible","image-optimization","lazy-load","magento-2","magento-module","magento2","magento2-module","performance","php","webp"],"latest_commit_sha":null,"homepage":"https://etechflow.com","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/etechflow.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-05-21T04:44:29.000Z","updated_at":"2026-05-22T06:42:12.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/etechflow/module-image-optimizer","commit_stats":null,"previous_names":["etechflow/module-image-optimizer"],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/etechflow/module-image-optimizer","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/etechflow%2Fmodule-image-optimizer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/etechflow%2Fmodule-image-optimizer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/etechflow%2Fmodule-image-optimizer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/etechflow%2Fmodule-image-optimizer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/etechflow","download_url":"https://codeload.github.com/etechflow/module-image-optimizer/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/etechflow%2Fmodule-image-optimizer/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33698654,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-05-30T02:00:06.278Z","response_time":92,"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":["core-web-vitals","ecommerce","etechflow","hyva","hyva-compatible","image-optimization","lazy-load","magento-2","magento-module","magento2","magento2-module","performance","php","webp"],"created_at":"2026-05-30T16:00:25.320Z","updated_at":"2026-05-30T16:00:40.216Z","avatar_url":"https://github.com/etechflow.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ETechFlow Image Optimizer\n\nServer-side WebP image optimization for Magento 2. No external API, no per-image fees, no rate limits.\n\n## Install\n\n```bash\ncomposer require etechflow/module-image-optimizer:^1.0\nbin/magento module:enable ETechFlow_ImageOptimizer\nbin/magento setup:upgrade\nbin/magento setup:di:compile\nbin/magento cache:flush\n# Restart php-fpm to clear OPcache (mandatory on prod with opcache.validate_timestamps=0)\n```\n\n## Activate the licence\n\n```bash\nphp tools/generate-license.php --module=image-optimizer --host=\u003cyour-domain\u003e\n```\n\nPaste into **Stores → Configuration → eTechFlow → Image Optimizer → License Key** (or use the Bundle License Key if you're an ETechFlow suite customer).\n\n## Verify\n\n```bash\nbin/magento etechflow:io:verify\n```\n\nTwelve PASS lines means you're good to go.\n\n## Run the first bulk optimization\n\n```bash\nbin/magento etechflow:io:optimize\n```\n\nWalks `pub/media/catalog/product/cache/`, converts every JPEG/PNG to WebP. Resumable, idempotent, dedupes already-converted images.\n\nAfter this finishes once, the `\u003cpicture\u003e` block plugin starts emitting WebP variants automatically on every PDP / category page. New images cached by Magento are picked up on the next cron tick (every 5 min).\n\n## How it works\n\nThree pieces:\n\n1. **Conversion engine chain** — tries `cwebp` binary first (fastest), then ImageMagick PHP extension, then PHP-GD. First available wins. No external API.\n2. **Per-image `\u003cpicture\u003e` block** — when Magento renders `\u003cimg src=\"x.jpg\"\u003e`, our plugin wraps it: `\u003cpicture\u003e\u003csource srcset=\"x.webp\" type=\"image/webp\"\u003e\u003cimg src=\"x.jpg\" loading=\"lazy\"\u003e\u003c/picture\u003e`. WebP-capable browsers grab the smaller file; the rest get the JPEG. Universal compatibility.\n3. **Bulk + cron CLI** — convert existing inventory once, then trust the cron to keep up with new images.\n\n## Configuration\n\n`Stores → Configuration → eTechFlow → Image Optimizer`:\n\n- **License Key** — per-module key (or use Bundle License Key for the suite)\n- **Module Enabled** — toggle the whole feature\n- **Quality** — 1-100, default 80. Higher = larger files, marginal quality gain past ~85.\n- **Conversion engine order** — pick which engines to try and in what order. Default: cwebp → Imagick → GD.\n- **Image coverage** — which images to optimize: product catalog, search, cross-sells, CMS images, sliders.\n- **Bulk batch size** — how many images per cron tick (default 200).\n\n## Honest caveats\n\n- Requires PHP-GD with WebP support **OR** Imagick with WebP support **OR** `cwebp` binary installed. Most modern hosts have at least one. Run `etechflow:io:verify` to confirm.\n- Doubles the size of `pub/media/catalog/product/cache/` (JPEG + WebP coexist). Plan disk space accordingly — typically +25-40% growth.\n- After the first bulk run, your CDN cache needs a purge to start serving the new HTML with `\u003cpicture\u003e` tags.\n\n## Compatibility\n\n- Magento Open Source 2.4.4 – 2.4.8\n- Adobe Commerce 2.4.4 – 2.4.8\n- PHP 8.1 / 8.2 / 8.3 / 8.4\n- Hyvä Theme + Hyvä Checkout\n- Luma theme\n\n## Support\n\ninfo@etechflow.com — include your license key + Magento version when reporting issues.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fetechflow%2Fmodule-image-optimizer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fetechflow%2Fmodule-image-optimizer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fetechflow%2Fmodule-image-optimizer/lists"}