{"id":20128945,"url":"https://github.com/intervention/image-laravel","last_synced_at":"2026-04-02T15:13:29.884Z","repository":{"id":217627144,"uuid":"744375523","full_name":"Intervention/image-laravel","owner":"Intervention","description":"Laravel Integration for Intervention Image","archived":false,"fork":false,"pushed_at":"2026-03-28T07:43:06.000Z","size":70,"stargazers_count":147,"open_issues_count":1,"forks_count":15,"subscribers_count":2,"default_branch":"develop","last_synced_at":"2026-03-28T11:50:19.585Z","etag":null,"topics":["gd","image","imagick","intervention","laravel"],"latest_commit_sha":null,"homepage":"https://image.intervention.io","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/Intervention.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":".github/FUNDING.yml","license":"LICENSE","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},"funding":{"github":["Intervention"],"ko_fi":"interventionphp","custom":"https://paypal.me/interventionio"}},"created_at":"2024-01-17T07:04:23.000Z","updated_at":"2026-03-28T07:13:22.000Z","dependencies_parsed_at":"2024-01-17T15:27:06.058Z","dependency_job_id":"a36a373d-19fc-4230-8d1b-32e78a827a77","html_url":"https://github.com/Intervention/image-laravel","commit_stats":{"total_commits":44,"total_committers":2,"mean_commits":22.0,"dds":"0.11363636363636365","last_synced_commit":"54716e98e8848c2efc95b3353861fea7a07b7580"},"previous_names":["intervention/image-laravel"],"tags_count":20,"template":false,"template_full_name":null,"purl":"pkg:github/Intervention/image-laravel","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Intervention%2Fimage-laravel","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Intervention%2Fimage-laravel/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Intervention%2Fimage-laravel/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Intervention%2Fimage-laravel/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Intervention","download_url":"https://codeload.github.com/Intervention/image-laravel/tar.gz/refs/heads/develop","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Intervention%2Fimage-laravel/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31308748,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-02T12:59:32.332Z","status":"ssl_error","status_checked_at":"2026-04-02T12:54:48.875Z","response_time":89,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["gd","image","imagick","intervention","laravel"],"created_at":"2024-11-13T20:30:43.553Z","updated_at":"2026-04-02T15:13:29.876Z","avatar_url":"https://github.com/Intervention.png","language":"PHP","funding_links":["https://github.com/sponsors/Intervention","https://ko-fi.com/interventionphp","https://paypal.me/interventionio"],"categories":[],"sub_categories":[],"readme":"# Intervention Image Laravel\n## Laravel Integration for Intervention Image\n\n[![Latest Version](https://img.shields.io/packagist/v/intervention/image-laravel.svg)](https://packagist.org/packages/intervention/image-laravel)\n[![Tests](https://github.com/Intervention/image-laravel/actions/workflows/build.yml/badge.svg)](https://github.com/Intervention/image-laravel/actions/workflows/build.yml)\n[![Monthly Downloads](https://img.shields.io/packagist/dm/intervention/image-laravel.svg)](https://packagist.org/packages/intervention/image-laravel/stats)\n[![Support me on Ko-fi](https://raw.githubusercontent.com/Intervention/image-laravel/main/.github/images/support.svg)](https://ko-fi.com/interventionphp)\n\nThis package provides an integration to setup [Intervention\nImage](https://image.intervention.io) easily to your Laravel application.\nIncluded are a Laravel service provider, facade and a publishable configuration\nfile.\n\n## Requirements\n\n- Laravel \u003e= 8\n\n## Installation\n\nIn your existing Laravel application you can install this package using [Composer](https://getcomposer.org).\n\n```bash\ncomposer require intervention/image-laravel\n```\n\n## Features\n\nAlthough Intervention Image can be used with Laravel without this extension,\nthis integration package includes the following features that make image\ninteraction with the framework much easier.\n\n### Application-wide configuration\n\nThe extension comes with a global configuration file that is recognized by\nLaravel. It is therefore possible to store the settings for Intervention Image\nonce centrally and not have to define them individually each time you call the\nimage manager.\n\nThe configuration file can be copied to the application with the following command.\n\n```bash\nphp artisan vendor:publish --provider=\"Intervention\\Image\\Laravel\\ServiceProvider\"\n```\n\nThis command will publish the configuration file `config/image.php`. Here you\ncan set the desired driver and its configuration options for Intervention\nImage. By default the library is configured to use GD library for image\nprocessing.\n\nThe configuration files looks like this.\n\n```php\nreturn [\n\n    /*\n    |--------------------------------------------------------------------------\n    | Image Driver\n    |--------------------------------------------------------------------------\n    |\n    | Intervention Image supports “GD Library” and “Imagick” to process images\n    | internally. Depending on your PHP setup, you can choose one of them.\n    |\n    | Included options:\n    |   - \\Intervention\\Image\\Drivers\\Gd\\Driver::class\n    |   - \\Intervention\\Image\\Drivers\\Imagick\\Driver::class\n    |   - \\Intervention\\Image\\Drivers\\Vips\\Driver::class\n    */\n\n    'driver' =\u003e env('IMAGE_DRIVER', \\Intervention\\Image\\Drivers\\Gd\\Driver::class),\n\n    /*\n    |--------------------------------------------------------------------------\n    | Configuration Options\n    |--------------------------------------------------------------------------\n    |\n    | These options control the behavior of Intervention Image.\n    |\n    | - \"autoOrientation\" controls whether an imported image should be\n    |    automatically rotated according to any existing Exif data.\n    |\n    | - \"decodeAnimation\" decides whether a possibly animated image is\n    |    decoded as such or whether the animation is discarded.\n    |\n    | - \"backgroundColor\" Defines the default background \u0026 blending color.\n    |\n    | - \"strip\" controls if meta data like exif tags should be removed when\n    |    encoding images.\n    */\n\n    'options' =\u003e [\n        'autoOrientation' =\u003e true,\n        'decodeAnimation' =\u003e true,\n        'backgroundColor' =\u003e 'ffffff',\n        'strip' =\u003e false,\n    ]\n];\n```\n\nYou can read more about the different options for\n[driver selection](https://image.intervention.io/v4/basics/configuration-drivers#driver-selection), setting options for \n[auto orientation](https://image.intervention.io/v4/modifying-images/effects#image-orientation-according-to-exif-data), \n[decoding animations](https://image.intervention.io/v4/modifying-images/animations) and \n[background color](https://image.intervention.io/v4/basics/colors#transparency).\n\n### Static Facade Interface\n\nThis package also integrates access to Intervention Image's central entry\npoint, the `ImageManager::class`, via a static [facade](https://laravel.com/docs/11.x/facades). The call provides access to the\ncentrally configured [image manager](https://image.intervention.io/v4/basics/instantiation) via singleton pattern.\n\nThe following code example shows how to read an image from an upload request\nthe image facade in a Laravel route and save it on disk with a random file\nname.\n\n```php\nuse Illuminate\\Http\\Request;\nuse Illuminate\\Support\\Facades\\Route;\nuse Illuminate\\Support\\Facades\\Storage;\nuse Illuminate\\Support\\Str;\nuse Intervention\\Image\\Laravel\\Facades\\Image;\n\nRoute::get('/', function (Request $request) {\n    $upload = $request-\u003efile('image');\n    $image = Image::decode($upload)\n        -\u003eresize(300, 200);\n\n    Storage::put(\n        Str::random() . '.' . $upload-\u003egetClientOriginalExtension(),\n        $image-\u003eencodeUsingFileExtension($upload-\u003egetClientOriginalExtension(), quality: 70)\n    );\n});\n```\n\n### Image Response Macro\n\nFurthermore, the package includes a response macro that can be used to\nelegantly encode an image resource and convert it to an HTTP response in a\nsingle step.\n\nThe following code example shows how to read an image from disk apply\nmodifications and use the image response macro to encode it and send the image\nback to the user in one call. Only the first parameter is required.\n\n```php\nuse Illuminate\\Support\\Facades\\Route;\nuse Illuminate\\Support\\Facades\\Storage;\nuse Intervention\\Image\\Format;\nuse Intervention\\Image\\Laravel\\Facades\\Image;\n\nRoute::get('/', function () {\n    $image = Image::decode(Storage::get('example.jpg'))\n        -\u003escale(300, 200);\n\n    return response()-\u003eimage($image, Format::WEBP, quality: 65);\n});\n```\n\nYou can read more about intervention image in general in the [official documentation of Intervention Image](https://image.intervention.io).\n\n## Authors\n\nThis library is developed and maintained by [Oliver Vogel](https://intervention.io)\n\nThanks to the community of [contributors](https://github.com/Intervention/image-laravel/graphs/contributors) who have helped to improve this project.\n\n## License\n\nIntervention Image Laravel is licensed under the [MIT License](LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fintervention%2Fimage-laravel","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fintervention%2Fimage-laravel","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fintervention%2Fimage-laravel/lists"}