Skip to main content

Why Migrate to Imperial?

Zero Egress Fees

Unlimited bandwidth with no surprise bills

No Compression

Your images stay pristine (unless you choose compression)

Better Control

Full API access, custom compression, detailed analytics

Fair Pricing

Transparent tier-based pricing, no hidden costs

From Imgur

Imgur’s free tier has become increasingly restrictive. Here’s how to migrate:

What You’re Gaining

FeatureImgur FreeImperial Pro
StorageUnknown10 GB
BandwidthLimitedUnlimited
API AccessRestrictedFull access
CompressionForcedYour choice
AnalyticsBasicDetailed
PriceFree (with ads)$6.99/mo

Migration Steps

1

Sign Up for Imperial

Create your account at app.imperial.gay
2

Export Your Imgur Images

Imgur doesn’t offer bulk export, but you can:
3

Upload to Imperial

Use our batch upload tool or API:
# Upload single file
curl -X POST https://api.imperial.gay/images/upload \
  -H "Authorization: Bearer YOUR_KEY" \
  -F "[email protected]"
4

Update Your Links

Replace Imgur URLs with Imperial URLs in your:
  • Websites and apps
  • Social media posts
  • Documentation
  • Databases

Imgur API Equivalent

Imgur EndpointImperial Equivalent
POST /3/imagePOST /images/upload
GET /3/account/me/imagesGET /images
DELETE /3/image/{id}DELETE /images/{id}
// Imgur upload
const response = await fetch('https://api.imgur.com/3/image', {
  method: 'POST',
  headers: {
    'Authorization': 'Bearer YOUR_IMGUR_TOKEN'
  },
  body: formData
});

From Gyazo

Gyazo is great for quick screenshots but lacks flexibility. Here’s your upgrade path:

What You’re Gaining

FeatureGyazo ProImperial Pro
Storage10 GB10 GB
BandwidthLimitedUnlimited
CompressionAutoOptional
APILimitedFull REST API
Price$4.99/mo$6.99/mo

Migration Steps

1

Download Gyazo Images

Export from your Gyazo library
2

Configure ShareX

Imperial works with ShareX (Gyazo’s alternative):
  1. Download ShareX
  2. Get your Imperial config
  3. Import to ShareX
3

Migrate Existing Images

Upload your Gyazo exports to Imperial via dashboard or API
4

Update Workflow

Use ShareX with Imperial for future screenshots

From Lightshot / Prnt.sc

Lightshot is convenient but has reliability issues. Upgrade to Imperial:

Migration Steps

1

Switch to ShareX

Lightshot doesn’t support custom uploaders, but ShareX does:
2

Migrate Old Screenshots

Unfortunately, Prnt.sc doesn’t allow bulk exports. You’ll need to:
  • Manually save important screenshots
  • Re-upload to Imperial
3

Configure Hotkeys

Set up your preferred shortcuts in ShareX (e.g., Ctrl+Shift+3)

From Self-Hosted Solutions

Migrating from your own infrastructure? Here’s what changes:

From Custom S3/R2 Setup

What you gain:
  • No infrastructure management
  • Built-in compression
  • Upload analytics
  • Video thumbnail generation
  • No ops burden
What you might miss:
  • Full infrastructure control
  • Custom CDN configuration
  • Direct bucket access

From ShareX + Custom Server

Already using ShareX with your own endpoint? Easy switch:
  1. Export your existing images from your server
  2. Download Imperial config for ShareX
  3. Import to replace your custom uploader
  4. Upload your existing images to Imperial
  5. Decommission your custom server
Keep your server running temporarily while you update old links, then shut it down once migration is complete.

Bulk Migration Tools

Using the Dashboard

For small migrations (< 100 files):
  1. Navigate to app.imperial.gay/images
  2. Drag and drop multiple files
  3. Wait for batch upload to complete

Using the API

For large migrations (hundreds/thousands of files):
const fs = require('fs');
const path = require('path');
const FormData = require('form-data');
const axios = require('axios');

async function migrateDirectory(dirPath) {
  const files = fs.readdirSync(dirPath);
  
  for (const file of files) {
    const filePath = path.join(dirPath, file);
    const form = new FormData();
    form.append('file', fs.createReadStream(filePath));
    
    try {
      const response = await axios.post(
        'https://api.imperial.gay/images/upload',
        form,
        {
          headers: {
            'Authorization': `Bearer ${process.env.IMPERIAL_KEY}`,
            ...form.getHeaders()
          }
        }
      );
      
      console.log(`✅ Uploaded: ${file}`);
      console.log(`   URL: ${response.data.uploaded[0].url}`);
      
      // Optional: Save URL mapping for link updates
      fs.appendFileSync('url-mapping.txt', 
        `${file} -> ${response.data.uploaded[0].url}\n`
      );
      
    } catch (error) {
      console.error(`❌ Failed: ${file}`, error.message);
    }
    
    // Rate limiting: wait 100ms between uploads
    await new Promise(resolve => setTimeout(resolve, 100));
  }
}

migrateDirectory('./images-to-migrate');
After migration, update your old URLs:

Database Update

-- MySQL/PostgreSQL
UPDATE posts 
SET image_url = REPLACE(
  image_url, 
  'https://i.imgur.com/', 
  'https://cdn.imperial.gay/uploads/'
);

-- MongoDB
db.posts.updateMany(
  { image_url: /^https:\/\/i\.imgur\.com\// },
  [{ 
    $set: { 
      image_url: { 
        $replaceAll: {
          input: "$image_url",
          find: "https://i.imgur.com/",
          replacement: "https://cdn.imperial.gay/uploads/"
        }
      }
    }
  }]
);

Code Update

// Before
const imageUrl = 'https://i.imgur.com/abc123.jpg';

// After
const imageUrl = 'https://cdn.imperial.gay/uploads/user-id/upload-id-filename.jpg';

URL Mapping File

Use the url-mapping.txt created during migration to find-and-replace:
# Load mapping into a script
while IFS=' -> ' read old_url new_url; do
  # Update config files, databases, etc.
  sed -i "s|$old_url|$new_url|g" your-config-file.conf
done < url-mapping.txt

Migration Checklist

1

Preparation

  • Create Imperial account
  • Choose appropriate tier
  • Set up API key or upload key
  • Test upload with single file
2

Migration

  • Export images from old service
  • Run bulk migration script
  • Verify all files uploaded successfully
  • Save URL mapping file
3

Update Links

  • Update database records
  • Update application code
  • Update documentation
  • Update external references
4

Verification

  • Test image loading on your site/app
  • Verify analytics/tracking still works
  • Check CDN performance
  • Monitor for broken links
5

Cleanup

  • Keep old service for 30 days (redirect period)
  • Cancel old subscriptions
  • Archive migration logs
  • Document the new setup

Need Help?