- How do I install and configure yoelpc4/laravel-cloudinary in a Laravel app?
- Run composer require yoelpc4/laravel-cloudinary, publish the package configuration, and add a cloudinary disk entry to config/filesystems.php. Credentials come from a single CLOUDINARY_URL environment variable or from discrete cloud name, API key, and API secret values. Once the disk is registered you call Storage::disk('cloudinary')->put(...) just like any other Laravel disk.
- Which Laravel, PHP, and Flysystem versions does this package support?
- The package targets Laravel 10 and 11 applications on PHP 8.1 or newer and is a Flysystem v3 adapter registered through Laravel's filesystem manager. Because Flysystem adapter contracts changed significantly across v1 to v3, check the exact constraints in the package composer.json and confirm it implements League\Flysystem\FilesystemAdapter v3. A low-traffic package can lag a framework upgrade by several quarters, so compare its release history against the Laravel version you plan to run.
- How do I generate Cloudinary transformation URLs from a Laravel disk?
- The driver projects url() calls on the disk onto Cloudinary delivery URLs, so paths become public_ids and transformation segments sit between the upload and delivery parts of the URL. You build the transformation string (resize, crop, quality, format) and pass it through the driver's URL options. Check the README for the exact option keys, since those parameters go to Cloudinary's URL builder rather than to Laravel itself.
- Which Storage operations are actually supported, such as get, readStream, listContents, size, and mimeType?
- Laravel's filesystem contract assumes a path-keyed blob store, while Cloudinary is an asset store keyed on public_id plus resource_type, so some operations are projected lossily. Read-back, directory listing, and metadata calls may be unimplemented, approximate, or backed by paginated Admin API requests. Review the adapter source and write one integration test per operation you depend on before shipping.
- How are folders and Cloudinary resource types mapped for a disk?
- Directory-style paths are translated into public_id prefixes, so a path like users/42/avatar becomes a public_id under that prefix. The disk configuration decides which resource_type (image, video, or raw) and delivery type are used for writes and URL generation. If you need different behavior per file kind, define separate disks rather than expecting one disk to switch resource types automatically.
- Can I create signed or temporary URLs for private Cloudinary assets?
- Laravel's temporaryUrl() maps onto Cloudinary's private delivery and signed URL mechanism so private assets can be served with an expiry. Verify in the source how the expiry is computed and whether it applies only to authenticated or private delivery types. If you need object lock or immutability guarantees, Cloudinary is not the right system of record.
- Is yoelpc4/laravel-cloudinary safe for production given the low star count and single maintainer?
- The dominant risk is adoption and bus factor: roughly 33 stars, one maintainer, no visible downstream cohort, and no support contract. The MIT license permits forking, but maintaining a Flysystem adapter is non-trivial for most teams, so pin the version and verify the tag provenance before depending on it. Applications that only write files and serve URLs are far lower risk than ones that treat storage as a general filesystem.
- How should I test a Cloudinary disk in my Laravel feature tests?
- Storage::fake() exercises Laravel's own driver semantics and will not cover Cloudinary-specific behavior such as public_id mapping, resource types, or signed URLs. Use a dedicated test cloud account and write integration tests around the exact operations your product calls. Keep fast unit tests for the code that builds paths and transformations so failures localize quickly.
- What are the alternatives to this package for using Cloudinary in Laravel?
- You can call the Cloudinary PHP SDK directly from a small service class, which avoids a third-party adapter but gives up the Storage facade abstraction. Other Laravel Cloudinary packages and generic Flysystem adapters exist, though Cloudinary's asset model means none is a true drop-in for S3. Many teams keep S3 or GCS as the system of record and use Cloudinary purely as a fetch-and-transform delivery layer.
- Can I store PDFs, videos, or other non-image files with this driver?
- Cloudinary is optimized for images and video; arbitrary documents such as PDFs require resource_type=raw, which changes both URL structure and deletion semantics. The driver may default to a single resource type per disk, so confirm how raw uploads are configured and how deletion knows the type at delete time. Validate this against your actual payload types before committing, and consider a separate disk for raw binaries.