{"id":22140682,"url":"https://github.com/athlan/cdn-serve-images","last_synced_at":"2025-03-24T11:18:16.075Z","repository":{"id":16866555,"uuid":"19626820","full_name":"athlan/cdn-serve-images","owner":"athlan","description":"CDN helper application to resize images on-the-fly based on Symfony2.","archived":false,"fork":false,"pushed_at":"2014-05-09T22:38:14.000Z","size":176,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-29T16:26:33.162Z","etag":null,"topics":["cdn"],"latest_commit_sha":null,"homepage":"","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/athlan.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}},"created_at":"2014-05-09T21:52:43.000Z","updated_at":"2017-08-12T10:19:29.000Z","dependencies_parsed_at":"2022-08-25T12:00:25.050Z","dependency_job_id":null,"html_url":"https://github.com/athlan/cdn-serve-images","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/athlan%2Fcdn-serve-images","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/athlan%2Fcdn-serve-images/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/athlan%2Fcdn-serve-images/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/athlan%2Fcdn-serve-images/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/athlan","download_url":"https://codeload.github.com/athlan/cdn-serve-images/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245258214,"owners_count":20585977,"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":["cdn"],"created_at":"2024-12-01T21:07:02.533Z","updated_at":"2025-03-24T11:18:16.054Z","avatar_url":"https://github.com/athlan.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# CDN Serve images\n\nThis application is the endpoint to serve images in correct resolution dynamically, without preparing all resolutions in advance.\n\nRapid installation and configuration.\n\n## Technologies\n\n* Written in Symfony2 (PHP 5)\n* [Imagine](https://github.com/avalanche123/Imagine) library is used ([AvalancheImagineBundle for Symfony](https://github.com/avalanche123/AvalancheImagineBundle)\n* Extensible, based on well written, open libraries\n* Works with GD2, Imagick, Gmagick\n\n##Basic Principles\n\nThe main purpose of Imagine is to provide all the necessary functionality to bring all native low level image processing libraries in PHP to the same simple and intuitive OO API.\n\nSeveral things are necessary to accomplish that:\n\n* Image manipulation tools, such as resize, crop, etc.\n* Drawing API - to create basic shapes and advanced charts, write text on the image\n* Masking functionality - ability to apply black\u0026white or grayscale images as masks, leading to semi-transparency or absolute transparency of the image the mask is being applied to\n\nThe above tools should be the basic foundation for a more powerful set of tools that are called ``Filters`` in Imagine.\n\nSome of the ideas for upcoming filters:\n\n* Charting and graphing filters - pie and bar charts, linear graphs with annotations\n* Reflection - apple style\n* Rounded corners - web 2.0\n\n## Configuration\n\nClone the project\n\n```\ngit clone git@github.com:athlan/cdn-serve-images.git ./\ncomposer install\n\nchmod 777 ./app/cache\nchmod 777 ./app/logs\nchmod 777 -R im/\n```\n\nConfigure in `parameters.yml`:\n\n\n```\nimagine_source_root:  '/path/to/originial/images'\nimagine_web_root:     %kernel.root_dir%/../web\nimagine_cache_prefix: im/v1\nimagine_driver:       gd\n\n# example\nimagine_filters:\n    120x90-crop:\n        type:    thumbnail\n        options: { size: [120, 90], mode: outbound }\n```\n\nAfter configuration run:\n\n```\nphp app/console cache:clear -e prod\n```\n\n## Usage\n\nAssume, that you are hosting app at `localhost:80` in public directory `myapp`. You have an image stored under directory `/path/to/originial/images/some/folder/image.jpg` and `imagine_source_root` set to `/path/to/originial/images/` and `imagine_cache_prefix` set to `im/v1`:\n\nhttp://server/myapp/im/v1/name_of_filter/some/folder/image.jpg\n\n## Thanks\n* [Bulat Shakirzyanov (avalanche123)](https://github.com/avalanche123)\n\n## Futher reading\n* [Imagine library documentation](https://github.com/avalanche123/Imagine)\n* [AvalancheImagineBundle Symfony Bundle](https://github.com/avalanche123/AvalancheImagineBundle)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fathlan%2Fcdn-serve-images","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fathlan%2Fcdn-serve-images","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fathlan%2Fcdn-serve-images/lists"}