Images posted to Stack's imgur space have the following URL structure:


This implies to me that images stored there have a five-character ID, with at least 62 possible characters at each position in the ID. So, that gives around a billion unique IDs.

I've been curious for a while now: what fraction of these IDs are now allocated? How rapidly is this ID space being consumed? Per questions, e.g., here and here, there is (or was) no garbage collection implemented to scrub "dead" images, so at some point there's presumably going to be a crunch on new IDs.

How close are we to the point of exhausting the imgur image ID space?

  • 2
    Why are you assuming that 5 alpha-nums won't go into 6? And then 7? And then 8?
    – Oded
    Feb 28, 2017 at 15:09
  • 4
    @Oded Because of the suffixing capability to change the display size of an image. And, yes, I know that it would probably work to extend the alpha-nums by just imposing the rule that no extended base ID is allowed to have any of the suffix characters at the end. But, I have no idea if imgur is set up to allow that.
    – hBy2Py
    Feb 28, 2017 at 15:13
  • This isn't stack only, whole of imgur is built this way. Feb 28, 2017 at 15:14
  • @ShadowWizard <nod>, that's what I thought. So, it seems like it would make the issue even more pressing for imgur at large. 1bb IDs is a small small small number for the whole world.
    – hBy2Py
    Feb 28, 2017 at 15:15
  • 2
    @hBy2Py well, I wrote a random imgur image generator, that just generates random 5 characters string and display it as imgur image. It got about 30% success, i.e. looks like 30% of the possible images are already allocated. Feb 28, 2017 at 15:16
  • @ShadowWizard I guess maybe imgur uses multiple subdomains to provide additional ID spaces -- perhaps they'd just issue i2.stack.imgur.com?
    – hBy2Py
    Feb 28, 2017 at 15:19
  • 4
    Here is the JS code if you're interested, you can click "edit in JSFiddle" to see it in action, but keep in mind that since it's totally random, you might get NSFW images there. Feb 28, 2017 at 15:19
  • 1
    ”Because of the suffixing capability to change the display size of an image.” This is not a problem. Add two characters instead. If the URL has 5 or 6 characters, it’s the 5-character code. If it has 7 or 8, it’s the 7-character code. Dec 5, 2023 at 15:43
  • Aha, that's a slick way to handle it -- odd-length IDs imply no suffix, even-length IDs imply a suffix is present. Thanks @CrisLuengo!
    – hBy2Py
    Dec 6, 2023 at 4:20

2 Answers 2


As of the latest backup mirror we took of imgur's data in mid-February, we had a total of 6,713,997 images hosted by imgur, totaling about 600GB.

The 5 character namespace imgur uses has 916,132,832 (62^5) possibilities, which puts us a bit under 1% utilization of the namespace.

  • What is this backup for? If imgur will decide to delete images one day? I thought you give imgur full control and trust over images. :) Feb 28, 2017 at 22:02
  • 2
    @ShadowWizard If imgur goes belly-up one day. Or, if imgur's backup discipline/hygiene is less than perfect. Or, if ....
    – hBy2Py
    Feb 28, 2017 at 22:10
  • 4
    @hBy2Py nailed it - it's not that we don't trust imgur, but we're paid to be paranoid about this kind of thing, and it makes sense to have a slightly-outdated copy under our own roof for both reasonably likely possibilities (an extended outage in S3, which imgur uses) and some of our more wild Mad Max-inspired business continuity scenarios. Feb 28, 2017 at 22:19
  • 4
    @ShaneMadden There's no backup quite like one you have total physical control over.
    – hBy2Py
    Feb 28, 2017 at 22:27

By my current estimate (from searching IDs from 00000 to 1w000ish), at the time of this writing (Jan 2024), it's more like 2.44%. That is, assuming that whatever ID-assignment function is being used has a uniform distribution (and it does appear to).

  • How did you check whether certain ID is assigned or not? Is the code available anywhere? Jan 9 at 10:57
  • Good to have this update. Now we have three data points! 0% in... 2014?, ~1% @ 2017, and 2.4% in 2024. :-D
    – hBy2Py
    Jan 9 at 15:14

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .