ImgBB’s public API is an upload API, not a library-management API. It documents no endpoint that lists all images in an account, and its delete_url opens a web page rather than a programmable DELETE endpoint. A safe migration therefore begins with the references you already control: source code, Markdown, database rows, CMS exports, email templates, and deployment configuration.
This guide copies images to PixelVault, but the migration shape applies to any destination. Keep the old URL and new URL together until every consumer has moved.
1. Build the inventory from your application
Search for both common ImgBB hosts. i.ibb.co usually serves image files; ibb.co usually identifies a page. Also inspect database and CMS fields that never appear in the repository.
Review imgbb-urls.txt by hand. Remove page URLs, trailing punctuation, duplicates, and anything you do not own or have permission to copy. An HTML or database export may need a format-aware parser rather than a regular expression.
2. Test the sources before starting
A migration can only import an image that ImgBB still serves publicly. Fetch a sample from the same environment that will run the migration:
Expect 200, an image/* content type, and a plausible byte count. If a URL returns HTML, a block page, or a missing response, recover that item from your original files instead of recording a false success.
3. Import sequentially and write the manifest after every success
The script below reads one source URL per line, imports it through PixelVault’s URL-upload API, and writes imgbb-migration.json after each successful copy. Sequential requests are slower than a large burst but easier to resume and less likely to trigger an undocumented source-host limit.
The stable Idempotency-Key makes a retry return the first stored image instead of creating another. Custom metadata keeps the source URL attached to the new image.
Know the size mismatch before a long run
ImgBB documents uploads up to 32 MB. PixelVault allows 5 MB per image on Free, 10 MB on Starter, and 15 MB on Pro. A source that exceeds the destination limit will fail; the script leaves it out of the manifest and continues.
Download those large files, preserve the original separately, then resize or re-encode a delivery copy with the image compressor or pixelvault optimize. Do not silently compress archival images if exact bytes matter.
4. Verify the destination, not just the API response
For each manifest row, fetch the new URL and compare at least MIME type, byte size, dimensions, and a visual sample. Byte-for-byte hashes may differ if you deliberately optimized an image, so record that transformation rather than treating it as an identical copy.
Run the application against a staging copy of the new mapping. Check pages, social cards, email templates, API payloads, and mobile clients. A successful migration script does not prove every consumer read the new field.
5. Switch references in reversible batches
Replace URLs from the manifest, not with a broad host-name substitution. ImgBB paths do not map mechanically to PixelVault paths. Start with one route or content collection, deploy it, watch for broken images, then continue.
- Keep the old URL in migration metadata or a separate audit table.
- Use the exact CDN URL returned by the API; do not construct it from the image ID.
- Update cached HTML, RSS output, email templates, and generated static files—not only the source database.
- Leave ImgBB copies in place until logs and a crawl show no remaining requests.
6. Remove the old dependency last
ImgBB’s documented API does not provide programmable deletion. If you retained each upload’s delete_url, a person can open those pages after the cutover. If you did not retain them, account-level cleanup is separate from the application migration.
For ImgBB’s upload parameters and the operations it does and does not expose, see the ImgBB API guide. The migration is complete when your application, generated output, and monitoring no longer depend on the old URLs—not when the copy script reaches the end of its input file.