Are there any letters/numbers that should be avoided in an ID?

For example, an image upload site that gives you a 5 digit ID for your file (domain.com/aCd5y)

Should any letters/digits not be used in the final ID, to make it easier for people to read and share links (without copy and paste)?

Should I avoid i, I, l or 1? How about O or 0? In the URL bar in Chrome, 0 doesn't have a line through it, and I (uppercase i) and l (lowercase L) look different, but I'm not sure about other browsers, devices, screens, etc.. for example in this post, uppercase I and lowercase L look the same.