- How do I install transloadit/php-sdk in a Laravel application?
- Install the official SDK with Composer using the transloadit/php-sdk package name, then configure your Transloadit key and secret from environment variables. In Laravel, bind the client as a singleton in a service provider and keep SDK calls behind your own TransloaditService adapter rather than calling it directly from controllers. The package is MIT licensed and Composer-installable, but it does not replace Laravel-specific workflow design, storage handoff, or webhook handling.
- Does transloadit/php-sdk work with Laravel?
- Yes, it is a PHP-native SDK that can be used inside Laravel applications, but it is not a Laravel-specific package with auto-discovered providers or facades. The recommended approach is to wrap it in a service class, submit assemblies from queued jobs, and handle status transitions through events or listeners. Check the package's Composer constraints for the PHP, Guzzle, and PSR dependency versions your Laravel release supports.
- What can I do with Transloadit assemblies in PHP?
- Assemblies let you define multi-step media processing workflows such as image resizing, thumbnailing, watermarking, format conversion, and video encoding. The SDK supports uploading local and remote files, creating and managing assemblies, polling assembly status, and retrieving processed results. It is an API client for Transloadit's hosted processing service, not a general file-storage or CMS package.
- How do I upload files and retrieve processed results with the SDK?
- Create an assembly with the processing steps you need, attach local or remote files, and submit it through the SDK. Because processing is asynchronous, poll the assembly status or use your own webhook flow to detect completion, then retrieve the resulting files from the response. In Laravel, store source and output files on configured filesystem disks and keep job state in your database.
- How does transloadit/php-sdk handle authentication and request signatures?
- The SDK uses your Transloadit key and secret to generate secure request signatures for API calls. Keep the secret in environment or secret management, never in client-side code, and avoid logging signed parameters. The SDK also documents optional auth.nonce usage, which is relevant when retried or duplicated submissions might otherwise trigger replay-protection failures.
- Should I enable auth.nonce for queued or retried Transloadit submissions?
- auth.nonce is optional in the SDK, so replay protection is an explicit application design decision rather than an enforced default. For queued jobs and retry logic, consider enabling it and confirming the replay window that applies to your workflow. Document the choice in your adapter so duplicate submissions are handled consistently.
- Does transloadit/php-sdk support Smart CDN signed URLs?
- Version 3.3.0 aligns its signature generation with the official transloadit CLI for Smart CDN use cases, reducing the risk of subtly incorrect signed URLs. If you front assets through Smart CDN, route signed-URL generation through one adapter so signature logic has a single owner. Note that the CLI-parity workflow is validated with the Node-based CLI and a Docker test harness outside the PHP toolchain.
- How should I handle asynchronous Transloadit processing and webhooks in Laravel?
- Submit assemblies from queued jobs and keep the SDK behind an application-owned service so controllers stay thin. For completion handling, implement a Laravel webhook controller or status-polling job, persist assembly state, and apply authentication and payload validation appropriate to your security model. Confirm Transloadit's webhook signature documentation before relying on the SDK for request verification, and plan for delivery failures and retries.
- What are the main risks of adopting transloadit/php-sdk?
- The main risks are vendor lock-in to Transloadit assemblies, external API availability, secret management, webhook delivery failures, large-file or timeout behavior, rate limits, and pricing surprises. Adoption signals are modest, with around 61 stars and repository metadata marked unknown, so treat it as a tactical vendor dependency rather than a broad ecosystem standard. Pin versions, wrap the SDK behind an adapter, and keep a fallback plan such as local FFmpeg or ImageMagick processing.
- How can I test and stage a Transloadit workflow before production?
- Start with a proof of concept for one non-critical workflow, such as image thumbnails or video transcoding, and compare output quality, latency, and cost against your current process. Validate assembly definitions in staging, feature-flag the production workflow, and test retry, replay-protection, and signed-URL behavior if Smart CDN is in scope. Because signature behavior in v3.3.0 is validated against the official CLI, include signed-URL checks in your PoC rather than assuming parity.