{"id":20527419,"url":"https://github.com/smknstd/fakerphp-picsum-images","last_synced_at":"2025-04-14T04:22:26.662Z","repository":{"id":38794670,"uuid":"405021590","full_name":"smknstd/fakerphp-picsum-images","owner":"smknstd","description":"Alternative image provider for fakerphp using picsum","archived":false,"fork":false,"pushed_at":"2023-08-01T10:07:46.000Z","size":32,"stargazers_count":30,"open_issues_count":0,"forks_count":4,"subscribers_count":3,"default_branch":"main","last_synced_at":"2024-04-14T10:15:35.869Z","etag":null,"topics":["faker","php","picsum-api"],"latest_commit_sha":null,"homepage":"https://picsum.photos","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/smknstd.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":".github/CONTRIBUTING.md","funding":".github/FUNDING.yml","license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":".github/SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":"smknstd"}},"created_at":"2021-09-10T09:11:09.000Z","updated_at":"2024-06-20T22:01:21.009Z","dependencies_parsed_at":"2024-06-20T22:01:14.999Z","dependency_job_id":"a35cb274-5095-4b58-b885-5468481b40bf","html_url":"https://github.com/smknstd/fakerphp-picsum-images","commit_stats":{"total_commits":17,"total_committers":2,"mean_commits":8.5,"dds":0.05882352941176472,"last_synced_commit":"1caed0dd92031967fff30c25b055b268afb91bb8"},"previous_names":[],"tags_count":3,"template":false,"template_full_name":"spatie/package-skeleton-php","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/smknstd%2Ffakerphp-picsum-images","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/smknstd%2Ffakerphp-picsum-images/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/smknstd%2Ffakerphp-picsum-images/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/smknstd%2Ffakerphp-picsum-images/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/smknstd","download_url":"https://codeload.github.com/smknstd/fakerphp-picsum-images/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248819746,"owners_count":21166539,"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":["faker","php","picsum-api"],"created_at":"2024-11-15T23:18:48.564Z","updated_at":"2025-04-14T04:22:26.638Z","avatar_url":"https://github.com/smknstd.png","language":"PHP","funding_links":["https://github.com/sponsors/smknstd"],"categories":[],"sub_categories":[],"readme":"# Fakerphp Picsum Images\n\n[![Latest Version on Packagist](https://img.shields.io/packagist/v/smknstd/fakerphp-picsum-images.svg?style=flat-square)](https://packagist.org/packages/smknstd/fakerphp-picsum-images)\n[![GitHub Tests Action Status](https://img.shields.io/github/actions/workflow/status/smknstd/fakerphp-picsum-images/run-tests.yml?branch=main)](https://github.com/smknstd/fakerphp-picsum-images/actions?query=workflow%3ATests+branch%3Amain)\n[![Total Downloads](https://img.shields.io/packagist/dt/smknstd/fakerphp-picsum-images.svg?style=flat-square)](https://packagist.org/packages/smknstd/fakerphp-picsum-images)\n\n## Introduction\n\nAlternative image provider for [fakerphp](https://github.com/fakerphp/faker) using [picsum.photos](https://picsum.photos)\n\n_This package has been forked from [mmo/faker-images](https://github.com/morawskim/faker-images) for [fzaninotto/faker](https://github.com/fzaninotto/Faker) (deprecated [~ Oct 2020](https://marmelab.com/blog/2020/10/21/sunsetting-faker.html))._\n \n## Ressources\n\n- [Tutorial for laravel](https://smknstd.medium.com/fake-beautiful-images-in-laravel-51062967d1db)\n \n## Installation\n\nYou can install the package via composer in dev dependency section:\n\n```bash\ncomposer require --dev smknstd/fakerphp-picsum-images\n```\n\n## Usage\n\n```php\n$faker = \\Faker\\Factory::create();\n$faker-\u003eaddProvider(new \\Smknstd\\FakerPicsumImages\\FakerPicsumImagesProvider($faker));\n\n// return a string that contains a url like 'https://picsum.photos/800/600/'\n$faker-\u003eimageUrl(width: 800, height: 600); \n\n// return a string that contains a url which returns the same random image based on the provided seed\n$filePath= $faker-\u003eimage(width: 800, height: 800, seed: 'useremail@example.com');\n\n// download a properly sized image from picsum into a file with a file path like '/tmp/13b73edae8443990be1aa8f1a483bc27.jpg'\n$filePath= $faker-\u003eimage(dir: '/tmp', width: 640, height: 480);\n```\n\nAlso, there are some more options :\n- alternative webp format\n- effects (grayscale, blurry)\n- seeding ensures you can get the same photo each time by providing a seed string\n- returning a specific photo based on an id instead of a random one (ex: https://picsum.photos/id/1/800/600)\n\n## Testing\n\n```bash\ncomposer test\n```\n\n## Contributing\n\nPlease see [CONTRIBUTING](.github/CONTRIBUTING.md) for details.\n\n## Security Vulnerabilities\n\nPlease review [our security policy](../../security/policy) on how to report security vulnerabilities.\n\n## Credits\n\n- [Arnaud Becher](https://github.com/smknstd)\n- [Marcin Morawski ](https://github.com/morawskim)\n\n## License\n\nThe MIT License (MIT). Please see [License File](LICENSE.md) for more information.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsmknstd%2Ffakerphp-picsum-images","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsmknstd%2Ffakerphp-picsum-images","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsmknstd%2Ffakerphp-picsum-images/lists"}