{"id":17759128,"url":"https://github.com/approached/laravel-image-optimizer","last_synced_at":"2025-04-05T11:11:19.079Z","repository":{"id":34184249,"uuid":"38035790","full_name":"approached/laravel-image-optimizer","owner":"approached","description":"[deprecated] Image optimizer for laravel","archived":false,"fork":false,"pushed_at":"2018-03-05T21:49:52.000Z","size":399,"stargazers_count":153,"open_issues_count":3,"forks_count":33,"subscribers_count":10,"default_branch":"master","last_synced_at":"2024-09-28T15:38:06.093Z","etag":null,"topics":["image-optimization","laravel"],"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/approached.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":"2015-06-25T07:51:10.000Z","updated_at":"2024-09-18T07:30:02.000Z","dependencies_parsed_at":"2022-07-13T21:34:02.354Z","dependency_job_id":null,"html_url":"https://github.com/approached/laravel-image-optimizer","commit_stats":null,"previous_names":[],"tags_count":11,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/approached%2Flaravel-image-optimizer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/approached%2Flaravel-image-optimizer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/approached%2Flaravel-image-optimizer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/approached%2Flaravel-image-optimizer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/approached","download_url":"https://codeload.github.com/approached/laravel-image-optimizer/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247325693,"owners_count":20920714,"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":["image-optimization","laravel"],"created_at":"2024-10-26T18:10:53.641Z","updated_at":"2025-04-05T11:11:19.059Z","avatar_url":"https://github.com/approached.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"This package is now **deprecated**. I prefer to use [spatie/image-optimizer](https://github.com/spatie/image-optimizer) package. Because this code is better structured.\n\n\u003chr\u003e\n\n# Laravel Imageoptimizer\n\n[![License](https://poser.pugx.org/approached/laravel-image-optimizer/license)](https://packagist.org/packages/approached/laravel-image-optimizer)\n[![Latest Stable Version](https://poser.pugx.org/approached/laravel-image-optimizer/v/stable)](https://packagist.org/packages/approached/laravel-image-optimizer)\n[![Total Downloads](https://poser.pugx.org/approached/laravel-image-optimizer/downloads)](https://packagist.org/packages/approached/laravel-image-optimizer)\n[![Build Status](https://travis-ci.org/approached/laravel-image-optimizer.svg)](https://travis-ci.org/approached/laravel-image-optimizer)\n\nWith this package you can easy optimize your image in **laravel 5.x** or **lumen**. Read the google instruction https://developers.google.com/speed/docs/insights/OptimizeImages about image optimize.\n\n## Installation\n\nRecommend convert packages:\n```bash\nsudo apt-get install pngquant gifsicle jpegoptim\n```\n\n- Require this package with composer:\n```\ncomposer require approached/laravel-image-optimizer\n```\n\n- After updating composer, add the ServiceProvider to the providers array in `config/app.php`\n```php\nApproached\\LaravelImageOptimizer\\ServiceProvider::class,\n```\n\n- Copy the package config to your local config with the publish command:\n```\nphp artisan vendor:publish --tag=imageoptimizer\n```\n\n## Usage\n\n### Automatic ([middleware](https://laravel.com/docs/5.4/middleware))\nIf you want to run the ImageOptimizer automatically for all the uploaded images:\n```php\nRoute::post('admin/image/upload', function () {\n    $picture = $request-\u003efile('picture');\n\n   ...\n})-\u003emiddleware('AutoImageOptimizer');\n```\n\n### Manual\n\nOn uploading a file:\n```php\npublic function store(Request $request, ImageOptimizer $imageOptimizer)\n    {\n        $picture = $request-\u003efile('picture');\n\n        // optimize\n        $imageOptimizer-\u003eoptimizeUploadedImageFile($picture);\n\n        // save\n        Storage::put('/my/cool/path/test.jpg', File::get($picture));\n\n        ...\n    }\n```\n\n## Extension\n\n- On-demand image manipulation [alcodo/powerimage](https://github.com/alcodo/powerimage)\n\n## License\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fapproached%2Flaravel-image-optimizer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fapproached%2Flaravel-image-optimizer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fapproached%2Flaravel-image-optimizer/lists"}