Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Imagekit Laravel Package

imagekit/imagekit

Laravel integration for ImageKit.io that simplifies uploading, storing, and managing media, generating optimized transformation URLs, and serving responsive images. Provides a clean API for file operations and straightforward configuration for Laravel applications.

View on GitHub
Deep Wiki
Context7

PHP SDK for ImageKit.io API.

Frequently asked questions about Imagekit
How do I install and set up imagekit/imagekit in a Laravel application?
Install it with composer require imagekit/imagekit, then add ImageKit credentials as environment variables and read them from a config/imagekit.php file. Because the package is framework-agnostic, create a small service class and bind it in a Laravel service provider instead of calling SDK classes from controllers or Blade templates. Run a non-production upload, delete, and URL-generation spike before wiring it into user flows.
Does imagekit/imagekit support Laravel 10, 11, or 12?
The package is a framework-agnostic PHP SDK, so Laravel version support depends mainly on your PHP version and Composer dependency compatibility rather than a Laravel-specific release. It does not ship a Laravel service provider or facade, so you add the integration glue yourself. Check PHP, Guzzle/PSR, and Composer constraints before adoption, and pin a tested version.
How should I store ImageKit API credentials in Laravel?
Keep the public key, private key, and endpoint URL in environment variables and expose them through config/imagekit.php. Never commit private credentials or send the private key to the browser; direct uploads should use signed authentication parameters generated server-side. Bind a configured client as a singleton in a service provider so credential handling stays in one place.
Can I upload Laravel UploadedFile instances with imagekit/imagekit?
Yes, the SDK can upload local files, remote URLs, and Laravel uploads by passing the file path or contents to its upload API. Store the returned ImageKit file ID and path so you can generate delivery URLs and delete assets later. Wrap the upload call in your own service and handle validation, timeouts, and API errors consistently.
How do I generate ImageKit transformation URLs for resizing and optimization?
Use the SDK's URL-generation helpers with transformation parameters such as width, height, crop, quality, and format, then output the resulting URL. Prefer generating URLs through an internal media service so templates do not depend directly on SDK classes. Store the provider-neutral file path or ID in your database and build delivery URLs at render time.
Is imagekit/imagekit a drop-in replacement for Laravel Storage?
No, it is an API SDK for ImageKit, not a Laravel filesystem adapter, so it should not be treated as a drop-in replacement for Storage. Keep Laravel Storage for application files that belong on local or S3 disks, and use the SDK behind a MediaService for ImageKit-managed images and videos. This separation makes upload flows, URL generation, and future provider changes easier to manage.
How do signed uploads work with imagekit/imagekit?
For direct browser or mobile uploads, your Laravel backend generates signed authentication parameters with the SDK and returns only those short-lived values to the client. The private API key stays server-side, and the client uses the signature to upload to ImageKit. Validate file type and size before signing, and decide whether uploads should be public or private.
How can I test an ImageKit integration in Laravel without calling the real API?
Put the SDK behind an interface such as ImageKitMediaService, then bind a fake implementation in Laravel tests so controllers and jobs do not hit ImageKit. For wrapper-level tests, mock the SDK's HTTP client and exception behavior, and add a few contract tests against a sandbox account if credentials are available. Avoid live API calls in the default test suite.
Is imagekit/imagekit actively maintained and safe for production?
The package has low community validation, with around 46 GitHub stars and no dependents in the assessment, and its last release was 2024-09-05. That does not make it unusable, but it means your team should own the integration, pin the version, and monitor for API drift. Production hardening should cover credential rotation, upload reliability, rate limits, webhook idempotency, and a fallback path if ImageKit is unavailable.
How do I avoid vendor lock-in when using ImageKit in Laravel?
Store provider-neutral media metadata such as file ID, path, MIME type, dimensions, and status, and keep ImageKit-specific fields in a clearly isolated layer. Route uploads and URL generation through your own MediaService or repository contract so a future provider swap does not require changes across controllers and views. Start with new media only, keep legacy local or S3 assets in place initially, and use a feature flag with fallback storage for rollout.
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
robertmarney/lara-hierarchial-collections
simonschaufi/rule-doc-generator
emissaoja/emissaoja
blackbricksoftware/gravityforms-civicrm-form-processor
al-rahabi/fancy-crud
jinas/dhivatar-component
mltstephane/laravel-quality
bernskiold/laravel-talentlms
bernskioldmedia/laravel-form-architect
youbar/easy-crud
c-point-labs/laravel-hostyourai
dbravoan/dbcms-admin-theme-dbcms
dbravoan/dbcms-theme-db-cyber
dbravoan/dbcms-blocks-basic
dbravoan/dbcms-module-content-audit
dbravoan/dbcms-module-ai-assistant
paygate-to/paygate-php
padosoft/askmydocs-connector-base
defstudio/supercharged-carbon
bernskioldmedia/laravel-matomo