WordPress plugin
The dropkit WordPress plugin turns dropkit into a drop-in replacement for your site’s uploads directory. New uploads are pushed to dropkit the moment WordPress finishes writing them to disk. Existing media can be migrated in one click. Images are resized on demand so you never generate local thumbnails again.
What it does
- New uploads are POSTed to
/v1/uploadonwp_handle_upload. The returned id and public URL are stored on the attachment as post meta. - Mirror or Move. Mirror keeps the local copy, Move deletes the original plus every intermediate thumbnail once the upload succeeds.
- URL rewriting covers
wp_get_attachment_url,image_downsize, andwp_calculate_image_srcset, so single URLs, WP intermediate sizes, and responsivesrcsetall come from dropkit with transform params (?w=&h=&fit=cover). - Skip intermediate thumbs (Move mode only). Returns
[]fromintermediate_image_sizes_advancedso WordPress stops writing per-size files. Dropkit resizes on demand instead. - Bulk migration for everything that was in your library before you installed the plugin. Batched, resumable, with live status.
- Delete sync. Deleting an attachment in WP fires
DELETE /v1/files/:id.
Install
- Grab
dropkit-wordpress-1.0.0.zipfrom your dashboard at dash.dropkit.app/plugins. - WordPress admin, Plugins, Add New, Upload Plugin, pick the zip.
- Activate.
Configure
- Open the dashboard, project, Keys, and create a server key (
sk_live_...). - In WordPress: Settings, dropkit, paste the key, Save.
- Upload a new image. Check the Media Library, the URL should now be on
cdn.dropkit.app.
Options
| Option | Default | What it does |
|---|---|---|
| Server key | blank | sk_live_... from your dropkit dashboard. Required. |
| Strategy | Mirror | Mirror keeps the local file. Move deletes the original plus its thumbnails after the upload succeeds. |
| Rewrite URLs | on | When on, attachment URLs and srcset return dropkit CDN URLs. Off keeps WP’s own /wp-content/uploads/ URLs. |
| Skip intermediate sizes | off | Move mode only. Stops WP from generating per-size thumbnail files on upload. Dropkit transforms on demand. |
| CDN base | https://cdn.dropkit.app | Override if you configured a custom domain on a paid plan. |
| API base | https://api.dropkit.app | Rarely changed. |
Migrating existing media
The plugin never touches existing attachments on its own. Two paths:
- Leave them local. Only new uploads go to dropkit. Simplest, no risk to existing media.
- Run the migration tool. Settings, dropkit, Start migration. Walks every attachment without dropkit meta in batches of five, logs per-file status, updates a running total, and remembers tombstones so subsequent runs skip files that can’t be uploaded (missing on disk, or over the 100 MiB cap). Safe to stop and resume.
Image transforms
The plugin hands dropkit the dimensions for thumbnail, medium, medium_large, large, and any custom size registered with add_image_size(). You can also pass a [width, height] tuple directly to wp_get_attachment_image_src. The URL comes back with ?w=&h=&fit=cover parameters and dropkit resizes on the fly.
Responsive images (srcset) are rewritten so every candidate width also comes from dropkit. That means the browser picks the right size and the CDN delivers it in one round trip.
Limits
- 100 MiB per file.
/v1/uploadcaps the Worker body at that. Files larger than 100 MiB stay local and the migration tool marks them as skipped. For very large files, use the SDK’s direct upload flow in your own frontend code. - Server key storage. The key lives in
wp_options. Standard WordPress security applies: anyone with admin access to your site can read it.
Troubleshooting
- Uploads work but URLs are still local. Check Settings, dropkit. Make sure “Rewrite URLs” is on.
- 500 on upload. Usually a bad key. Verify with
curl -X POST https://api.dropkit.app/v1/upload -H "authorization: Bearer sk_live_..." -F "file=@test.jpg". - Large files don’t upload. Anything over 100 MiB is skipped. The
error_logentry reads[dropkit] file exceeds 100 MiB cap, skipped. - Migration keeps showing “skipped”. Files with missing disk backup or over 100 MiB get tombstoned so they don’t block subsequent runs. That counter only goes down when you delete those attachments from WP.
Uninstall
Deactivating from the Plugins screen only disables the hooks. Uninstalling (Plugins, Delete) runs uninstall.php, which drops the dropkit_settings option. Attachment meta is preserved so reinstalling picks up right where you left off. Files on dropkit are untouched. Delete them from the dashboard if you want them gone.
Source
Plugin source lives at plugins/wordpress/dropkit/ in the dropkit repo (private). The zip is generated at request time from that source, so what you download is always in sync with what’s shipped.