- How do I install laravel-liberu/avatars in a Laravel application?
- Install the package with Composer using composer require laravel-liberu/avatars. Then follow the package's setup steps, which typically include registering the service provider if it is not auto-discovered and publishing any provided configuration or migration files. Check the repository README for the exact commands required for your Liberu application version.
- Which Laravel versions are supported by laravel-liberu/avatars?
- The supported Laravel versions depend on the package release and its Composer constraints. Review the require section in the package's composer.json or the repository README before installing. Liberu packages generally target modern Laravel releases, but you should confirm compatibility for your specific Laravel version.
- How does Laravel Liberu Avatars integrate with the User model?
- The package is designed to work with the core Liberu user model so avatars can be associated with user profiles. It handles the upload, storage, and retrieval lifecycle for profile images. You typically use the package's provided model traits, relationships, or accessors rather than building avatar handling from scratch.
- Which storage drivers can I use for avatar images?
- Laravel Liberu Avatars integrates with Laravel's filesystem storage drivers, so avatars can be stored on disks such as local storage or S3. The exact disk used is normally controlled through the package configuration. This lets you keep avatar files off the application server when needed.
- How do I display a user's avatar in a Blade template?
- Use the retrieval functionality provided by the package, such as an accessor, helper, or relationship exposed on the user model. The package handles fetching the stored profile image path so you can output it in an image tag. Check the README for the exact method or attribute name used by your package version.
- Can I customize where avatar images are stored?
- Storage location is generally controlled through Laravel filesystem configuration and the package's own configuration file. After publishing the config, you can point avatar uploads at a specific disk and path. Confirm the available options in the package repository documentation for your version.
- Does laravel-liberu/avatars validate or resize uploaded images?
- The package focuses on avatar upload, storage, and retrieval for Liberu applications. Validation rules and image resizing should be confirmed in the repository source or README, since those details depend on the release. If resizing is required, you may combine it with an image manipulation package.
- How can I test avatar uploads in Laravel?
- Use Laravel's testing helpers such as Storage::fake for the avatar disk and UploadedFile::fake to simulate image uploads. Then assert that the expected file exists and that the user's avatar reference was updated. This keeps avatar tests fast and avoids writing real files during the test run.
- What are alternatives to laravel-liberu/avatars?
- Alternatives include Spatie's laravel-medialibrary for broader media management, Gravatar for externally hosted avatars, or a small custom upload implementation using Laravel's filesystem and validation features. Choose based on whether you need a Liberu-specific integration or a more general media package.
- Is laravel-liberu/avatars actively maintained and safe for production?
- Check the GitHub repository and Packagist release history for recent commits, tagged versions, and open issues before using it in production. Because it is part of the Laravel Liberu ecosystem, compatibility is best when used alongside matching Liberu core packages. Review the license and test coverage for your risk assessment.