It's based on the userid, pretty much the same way
vB's attachment storage works. Having seperate folders for categories would result in the files having to be moved on the server anytime the category for an image is changed, so that's why we opted for the userid storage method.