Yes, you should have quite reasonable options to customize upload, there are plenty of existing solutions around.
As for specifics I am not sure on “database” as image storage option. They typical solutions that I’ve heard of are:
- dedicated location behind CDN (or some variation of);
- dedicated image storage service, such as Amazon S3.