{"id":27777811,"url":"https://github.com/gregwar/imagebundle","last_synced_at":"2025-04-30T07:12:04.897Z","repository":{"id":435002,"uuid":"2144640","full_name":"Gregwar/ImageBundle","owner":"Gregwar","description":"Image manipulation bundle for Symfony 2","archived":false,"fork":false,"pushed_at":"2023-04-26T11:20:37.000Z","size":98,"stargazers_count":196,"open_issues_count":34,"forks_count":50,"subscribers_count":13,"default_branch":"master","last_synced_at":"2025-04-30T07:11:53.842Z","etag":null,"topics":[],"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/Gregwar.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,"governance":null}},"created_at":"2011-08-02T19:36:45.000Z","updated_at":"2025-01-31T19:06:48.000Z","dependencies_parsed_at":"2023-07-05T14:54:55.017Z","dependency_job_id":null,"html_url":"https://github.com/Gregwar/ImageBundle","commit_stats":{"total_commits":124,"total_committers":16,"mean_commits":7.75,"dds":0.3629032258064516,"last_synced_commit":"454d9bf53204f4cdba650c6ec59232205304d2f8"},"previous_names":[],"tags_count":35,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Gregwar%2FImageBundle","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Gregwar%2FImageBundle/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Gregwar%2FImageBundle/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Gregwar%2FImageBundle/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Gregwar","download_url":"https://codeload.github.com/Gregwar/ImageBundle/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251658213,"owners_count":21622822,"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":"2025-04-30T07:12:00.905Z","updated_at":"2025-04-30T07:12:04.890Z","avatar_url":"https://github.com/Gregwar.png","language":"PHP","funding_links":["https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick\u0026hosted_button_id=YUXRLWHQSWS6L"],"categories":[],"sub_categories":[],"readme":"Gregwar's ImageBundle\n=====================\n\n[![paypal](https://www.paypalobjects.com/en_US/i/btn/btn_donateCC_LG.gif)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick\u0026hosted_button_id=YUXRLWHQSWS6L)\n\n`GregwarImageBundle` provides easy Image manipulation and API for Symfony and Twig\n\nIf you use older version than Symfony 4, please use the `2.*` version, else you can\nuse `3.*`.\n\nInstallation\n============\n\n### Step 1: Download the GregwarImageBundle\n\nRun the following composer command:\n\n```\n    composer req gregwar/image-bundle\n```\n### Step 2: Configure the bundle and set up the directories\n\nAdds the following configuration to your `app/config/config.yml`:\n\n    gregwar_image: ~\n\nIf you want to customize the cache directory name, you can specify it:\n\n    gregwar_image:\n        cache_dir:  my_cache_dir\n\nCreates the cache directory and change the permissions so the web server can write\nin it:\n\n    mkdir web/cache\n    chmod 777 web/cache\n\nYou can also enable the exception thrown if the given file does not exist:\n\n    gregwar_image:\n        throw_exception: true\n\nIf you don't throw an exception, you can set the `fallback_image`, to set the\nimage that should be rendered in this case:\n\n    gregwar_image:\n        fallback_image: /path/to/your/fallback.jpg\n\nIf you have to change directories hierarchy or Web's name (e.g. web =\u003e public_html), \nyou can set the `web_dir` to your new Web path:\n    \n    gregwar_image:\n        web_dir: %kernel.root_dir%/../../public_html\n\nWith Symfony Flex\n-----------------\n\nWith Symfony Flex architecture, you can create the ``config/packages/gregwar_image.yaml``\nfile with the following contents:\n    \n    gregwar_image:\n        web_dir: %kernel.root_dir%/../public\n\nUsage\n=====\n\nBasics\n------\n\nThis bundle is based on the [Gregwar's Image](http://github.com/Gregwar/Image) class and\nprovides simple but powerful Twig extension. You can for instance use it this way:\n\n```html\n\u003cimg src=\"{{ image('linux.jpg').resize(100,100).negate }}\" /\u003e\n```\n\nAnd that's all ! The helper will automatically create the cached file on-the-fly if it\ndoesn't exists yet.\n\nThe available methods are the same as the [Gregwar's Image](http://github.com/Gregwar/Image).\n\nYou can also use the logical file names for bundle resources :\n\n```html\n\u003cimg src=\"{{ image('@AcmeDemoBundle/Resources/images/linux.jpg').resize(100,100).negate }}\" /\u003e\n```\n\nIf you use `web_image()` helper, the image file path will be prefixed by the `web/` absolute\ndirectory of your application:\n\n```html\n\u003c!-- The image some/image.jpg will be prefixed by web directory prefix --\u003e\n\u003cimg src=\"{{ web_image('some/image.jpg').resize('10%') }}\" /\u003e\n```\n\nUsing Image API\n---------------\n\nThe image instance provides also a simple API, you can call some methods to get informations\nabout the handled image:\n\n    Image width: {{ image('linux.jpg').width }}px\n\nManipulating Image in Controllers\n---------------------------------\n\nThe Image Handler is accessible via a service called image.handling. So you can do in your\ncontrollers:\n\n```php\n\u003c?php\n...\n$this-\u003eget('image.handling')-\u003eopen('linux.jpg')\n    -\u003egrayscale()\n    -\u003erotate(12)\n    -\u003esave('out.jpg')\n```\n\nRequirements\n============\n\n`GregwarImageBundle` needs [GD](http://php.net/gd)\nand [exif](http://php.net/exif) extension for PHP to be installed on the web server\n\nLicense\n=======\n\nThis bundle is under MIT license\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgregwar%2Fimagebundle","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgregwar%2Fimagebundle","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgregwar%2Fimagebundle/lists"}