{"id":18812118,"url":"https://github.com/flipboxstudio/image-controller","last_synced_at":"2025-04-13T20:32:10.400Z","repository":{"id":62505599,"uuid":"71918340","full_name":"flipboxstudio/image-controller","owner":"flipboxstudio","description":"Image controller for laravel application","archived":false,"fork":false,"pushed_at":"2017-04-01T19:30:50.000Z","size":18,"stargazers_count":6,"open_issues_count":0,"forks_count":5,"subscribers_count":6,"default_branch":"master","last_synced_at":"2024-05-17T14:57:33.821Z","etag":null,"topics":["image-resizer","laravel","laravel-5-package","php"],"latest_commit_sha":null,"homepage":null,"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/flipboxstudio.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":"2016-10-25T16:46:15.000Z","updated_at":"2022-03-03T22:56:46.000Z","dependencies_parsed_at":"2022-11-02T12:16:53.026Z","dependency_job_id":null,"html_url":"https://github.com/flipboxstudio/image-controller","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flipboxstudio%2Fimage-controller","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flipboxstudio%2Fimage-controller/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flipboxstudio%2Fimage-controller/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flipboxstudio%2Fimage-controller/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/flipboxstudio","download_url":"https://codeload.github.com/flipboxstudio/image-controller/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":223605184,"owners_count":17172446,"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-resizer","laravel","laravel-5-package","php"],"created_at":"2024-11-07T23:29:47.013Z","updated_at":"2024-11-07T23:29:47.813Z","avatar_url":"https://github.com/flipboxstudio.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Image Controller\nController your images for client request with size, quality, and extenstion with easy way. You no longer need to create an image with multiple sizes, this package is already handling request images with size needed,\n\n## Features\n* Dynamic images request file\n* Controller image size\n* Controller image quality\n* Controller image extension\n* Cache image\n\n## Required\n* php \u003e= 5.6.4\n* laravel/framework 5.3.*\n* intervention/image ^2.3\n* intervention/imagecache ^2.3\n\n## Installation\nRequire this package with composer:\n```\ncomposer require flipbox/image-controller\n```\nAdd the ServiceProvider to the providers array in config/app.php\n```\nFlipbox\\ImageController\\ImageControllerServiceProvider::class,\n```\nAdd the facade of this package to the $aliases array config/app.php\n```\n'ImageController' =\u003e Flipbox\\ImageController\\Facade::class\n```\nCopy the package resource to your application with the publish command:\n```\nphp artisan vendor:publish\n```\nyour image ready to control :-)\n\n## Using package\nTo avoid clashed request, we suggest you to add a little code to the end of your `.htaccess` file in public laravel folder\n```\nRewriteRule .*\\.(jpg|png|gif|tif|bmp)$ index.php [NC,L]\n```\ncreate folder `images` to your public folder (however you can change name of folder in config file), and put image to that folder, for example you put image with file name a `photo.jpg`, and you can access your photo as usual `http://localhost/images/photo.jpg`.\n\n### Request with size\nNow you can request image with specify size (`thumbnail`,`small`,`medium`,`large`)\n\n`http://localhost/images/photo.jpg?size=thumbnail` default width 100px  \n`http://localhost/images/photo.jpg?size=small` default width 240px  \n`http://localhost/images/photo.jpg?size=medium` default width 500px  \n`http://localhost/images/photo.jpg?size=large` default width 1024px  \n\n### Request with specify width or height\nAlso you can request image with specify width or height or event both  \n`http://localhost/images/photo.jpg?width=320` auto height  \n`http://localhost/images/photo.jpg?height=320` auto width  \n`http://localhost/images/photo.jpg?width=100\u0026height=320` fixed width and height  \n\n### Request with another extension\nReal file extension will be ignored, now you can access your images file with extensions that defined in config or even with no extension  \n`http://localhost/images/photo` valid by default  \n`http://localhost/images/photo.jpg` valid by default  \n`http://localhost/images/photo.png` valid by default  \n`http://localhost/images/photo.gif` valid by default\n\n### Uploaded file\nWe provide uploader file that make upload file very easy. First parameter is [UploadedFile](https://laravel.com/api/5.2/Illuminate/Http/UploadedFile.html) or [Base64 Encoding](https://en.wikipedia.org/wiki/Base64), and second parameter is `directory/prefix.`\n```\nImageController::upload($request-\u003efile, 'profile');\n```\nthis method will be return string of generated filename `str_random(34)`\n\n### Model Assesor\nAdd [model accesor](https://laravel.com/docs/5.2/eloquent-mutators#accessors-and-mutators) to generate image link.\n```\n\t/**\n\t * Get ProfilePicture.\n\t *\n\t * @param  string  $value\n\t * @return string\n\t */\n\tpublic function getProfilePictureAttribute($value)\n\t{\n\t\treturn ImageController::generateImageUrl($value, 'small');\n\t}\n\n```\n\n### ToDo\n* Add Watermark\n* Test \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fflipboxstudio%2Fimage-controller","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fflipboxstudio%2Fimage-controller","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fflipboxstudio%2Fimage-controller/lists"}