{"id":20416393,"url":"https://github.com/folkloreinc/laravel-image","last_synced_at":"2025-04-12T17:06:50.819Z","repository":{"id":51028474,"uuid":"358003180","full_name":"folkloreinc/laravel-image","owner":"folkloreinc","description":null,"archived":false,"fork":false,"pushed_at":"2024-07-08T16:34:53.000Z","size":156,"stargazers_count":4,"open_issues_count":1,"forks_count":2,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-04-11T06:15:53.060Z","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":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/folkloreinc.png","metadata":{"files":{"readme":"Readme.md","changelog":null,"contributing":null,"funding":null,"license":null,"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}},"created_at":"2021-04-14T18:23:26.000Z","updated_at":"2023-12-30T21:16:28.000Z","dependencies_parsed_at":"2024-01-26T20:34:18.667Z","dependency_job_id":"dcf0c24b-3c44-465e-aeac-53181aa96111","html_url":"https://github.com/folkloreinc/laravel-image","commit_stats":{"total_commits":2,"total_committers":1,"mean_commits":2.0,"dds":0.0,"last_synced_commit":"b9233f6668dd0acb1221caf07493f38676a9c695"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/folkloreinc%2Flaravel-image","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/folkloreinc%2Flaravel-image/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/folkloreinc%2Flaravel-image/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/folkloreinc%2Flaravel-image/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/folkloreinc","download_url":"https://codeload.github.com/folkloreinc/laravel-image/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248602311,"owners_count":21131615,"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":"2024-11-15T06:19:43.223Z","updated_at":"2025-04-12T17:06:50.798Z","avatar_url":"https://github.com/folkloreinc.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Laravel Image\n\nLaravel Image is an image manipulation package for Laravel 4 and 5 based on the [PHP Imagine library](https://github.com/avalanche123/Imagine). It is inspired by [Croppa](https://github.com/BKWLD/croppa) as it can use specially formatted urls to do the manipulations. It supports basic image manipulations such as resize, crop, rotation, flip and effects such as negative, grayscale, gamma, colorize and blur. You can also define custom filters for greater flexibility. This library works with the local filesystem and Laravel Filesystems (Amazon S3, etc...).\n\n[![Latest Stable Version](https://poser.pugx.org/folklore/laravel-image/v/stable.svg)](https://packagist.org/packages/folklore/laravel-image)  \n[![Build Status](https://travis-ci.org/Folkloreatelier/laravel-image.png?branch=master)](https://travis-ci.org/Folkloreatelier/laravel-image)  \n[![Coverage Status](https://coveralls.io/repos/Folkloreatelier/laravel-image/badge.svg?branch=v1\u0026service=github)](https://coveralls.io/github/Folkloreatelier/laravel-image?branch=v1)  \n[![Total Downloads](https://poser.pugx.org/folklore/laravel-image/downloads.svg)](https://packagist.org/packages/folklore/laravel-image)\n\n## Introduction\n\nThe main difference between this package and other image manipulation libraries is that you can use parameters directly in the url to manipulate the image. A manipulated version of the image is then saved in the same path as the original image, **creating a static version of the file and bypassing Laravel for future requests** (this behaviour can be disabled).\n\nFor example, if you have an image at this URL:\n\n```\n/uploads/photo.jpg\n```\n\nTo create a 300x300 version of this image in black and white, you use the URL:\n\n```\n/uploads/photo-image(300x300-crop-grayscale).jpg\n```\n\nTo help you generate the URL to an image, you can use the `Image::url()` method\n\n```php\nImage::url('/uploads/photo.jpg', 300, 300, ['crop', 'grayscale']);\n```\n\nor\n\n```php\n\u003cimg src=\"\u003c?=Image::url('/uploads/photo.jpg', 300, 300, ['crop', 'grayscale']))?\u003e\" /\u003e\n```\n\nAlternatively, you can programmatically manipulate images using the `Image::make()` method. It supports all the same options as the `Image::url()` method.\n\n```php\nImage::make('/uploads/photo.jpg', [\n    'width' =\u003e 300,\n    'height' =\u003e 300,\n    'grayscale' =\u003e true\n])-\u003esave('/path/to/the/thumbnail.jpg');\n```\n\nor use directly the Imagine library\n\n```php\n$thumbnail = Image::open('/uploads/photo.jpg')\n            -\u003ethumbnail(new Imagine\\Image\\Box(300, 300));\n\n$thumbnail-\u003eeffects()-\u003egrayscale();\n\n$thumbnail-\u003esave('/path/to/the/thumbnail.jpg');\n```\n\n## Features\n\n#### Based on Imagine\nThis package use [Imagine](https://github.com/avalanche123/Imagine) for image manipulation. Imagine is compatible with GD2, Imagick, Gmagick and supports a lot of [features](http://imagine.readthedocs.org/en/latest/).\n\n#### Multiple Sources\nYou can define multiple sources for your images. Both locally and in the cloud (via Laravel filesystems).\n\n#### Filters\nThis package also provides some build-in filters ready to use \\([more on Filters](docs/filters.md)\\):\n\n* Resize\n* Crop \\(with position\\)\n* Rotation\n* Black and white\n* Invert\n* Gamma\n* Blur\n* Colorization\n* Interlace\n\n## Installation\n\n##### Version Compatibility\n\nLaravel 7 and up\n\n#### Dependencies:\n\n* [Laravel 7.x|8.x](https://github.com/laravel/laravel)\n* [Imagine 1.x](https://github.com/avalanche123/Imagine)\n\n#### Server Requirements:\n\n* [gd](http://php.net/manual/en/book.image.php) or [Imagick](http://php.net/manual/fr/book.imagick.php) or [Gmagick](http://www.php.net/manual/fr/book.gmagick.php)\n* [exif](http://php.net/manual/en/book.exif.php) - Required to get image format.\n\n#### Installation:\n\n**1-** Require the package via Composer.\n\n```json\n$ composer require folklore/laravel-image\n```\n\n**2-** Add the service provider to your `app/config/app.php` file\n\n```php\nFolklore\\Image\\ServiceProvider::class,\n```\n\n**3-** Add the facade to your `app/config/app.php` file\n\n```php\n'Image' =\u003e Folklore\\Image\\Facade::class,\n```\n\n**4-** Publish the configuration file and public files\n\n```bash\n$ php artisan vendor:publish --provider=\"Folklore\\Image\\ServiceProvider\"\n```\n\n**5-** Review the configuration file at `config/image.php`\n\n## Documentation\n\n* [Complete documentation](https://folkloreatelier.gitbooks.io/laravel-image/)\n\n## Roadmap\n\nHere are some features we would like to add in the future. Feel free to collaborate and improve this library.\n\n* Artisan command to manipulate images\n* Support for batch operations on multiple files\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffolkloreinc%2Flaravel-image","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffolkloreinc%2Flaravel-image","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffolkloreinc%2Flaravel-image/lists"}