rokka/client
Official PHP client for Rokka, the image processing and delivery service. Upload, store, and manage images, generate dynamic URLs with stack options, and integrate Rokka into PHP or Laravel apps through a simple, PSR-compatible API.
deleteSourceImageCache, deleteStackCache (including whole-organization purge), and alias-cache deletion. This turns "how fast can we correct a bad image?" from a custom-work item into a supported API call — relevant to brand-safety, legal takedowns, and content correction SLAs.downloadSourceImagesAsZip (up to 300 images per request) provides a documented bulk egress path. That materially de-risks the lock-in argument and supports a credible rollback plan in the vendor decision.User::getBilling enables usage/cost dashboards and budget alerts inside internal admin tooling. This converts image spend from an invoice surprise into a monitored product metric — useful for finance partnership and for triggering the "optimize transformations" backlog item.setOrganizationOptions (full replace) plus the existing single-option setter supports environment-parity and IaC-style management of org settings across staging/production.Consider it when:
Look elsewhere when:
Release-specific caveats to raise in due diligence:
keepHash option on setDynamicMetadata / deleteDynamicMetadata prevents hash churn (nice for late metadata fixes and stable URLs) but means downstream caches — CloudFront, memcached, browsers — serve stale renders until explicitly invalidated. It is mutually exclusive with deletePrevious and throws LogicException if both are passed. Product implication: any UI exposing "edit metadata without changing the image URL" needs a paired invalidation story.copySourceImage to POST, getSourceImagesWithBinaryHash to the documented path form) preserve signatures and behavior; internal API consumers should not notice. Treat as safe.signUrlOnServer exists, but UriHelper::signUrl() remains preferable for most cases since it signs locally without a network round trip. Architect for the local path to avoid latency and availability coupling.#[DataProvider] migration affects only the package's own tests, plus added MockHandler coverage of the new methods — a positive maintenance signal, not a consumer concern.For executives: This is the official PHP client for Rokka.io, a managed image CDN and transformation service. It lets us ship responsive images, dynamic crops, and optimized formats by buying image infrastructure instead of building it. The 1.22.0 release is a maturity signal: it adds cache purging, asset aliasing, metadata access, bulk export, and billing visibility — the operational controls that make a vendor bet survivable rather than just functional. Two things to weigh: the release is a hard platform bump requiring PHP 8.2, and stack cache purging is a paid feature. The strategic upside is faster media feature delivery and lower infrastructure ownership; the residual risks are usage-based cost growth and a small ecosystem. Recommend a time-boxed pilot with a documented exit path — the new bulk-export capability makes that exit path concrete.
For engineering: Plan the runtime upgrade before adopting 1.22.0 — PHP ^8.2 and Guzzle ^7.4.5/psr7 ^2.4.5, dropping 8.0/8.1 and Guzzle 6. Keep the SDK behind an internal image-service interface so the vendor remains replaceable. Use the new purge endpoints (deleteSourceImageCache, deleteStackCache, alias-cache deletion) as the single invalidation primitive rather than ad-hoc scripts. Prefer UriHelper::signUrl() over signUrlOnServer unless you specifically need server-issued URLs. Treat keepHash as a deliberate, documented trade-off — it silently risks stale CDN and browser caches, so pair it with explicit invalidation and make it opt-in at the call site. Pin the client, verify the changelog cadence, add integration tests around upload/transform/alias/purge flows, and secure API credentials. Do not assume Laravel conventions: no service provider, config publishing, or Blade integration.
For product and finance: This unlocks media-heavy features with less custom infrastructure and now gives us built-in levers for corrections and takedowns (cache purge), stable asset references (aliases), cost dashboards (billing API), and data egress (ZIP download). Costs still scale with image volume, transformations, and paid purge features — model expected traffic, transformation volume, and invalidation frequency before committing. Run a time-boxed pilot against at least one alternative vendor, confirm SLA, data-processing terms, and purge pricing, and define measurable adoption or rollback criteria up front.
How can I help you explore Laravel packages today?