Referential integrity can be enforced with the image name and not with the actual images. The image name only needs to be stored in the database and not the complete image.
How can you guarantee that the filesystem stays synchronized with the database? Yes, it's possible, but you have to write extra code to do it. Especially if the filesystem can be modified from outside the code that maintains the images. What if some bored system admin decides the filesystem needs more free space and nukes half of the images. Now you have to write a batch process to periodically scan the file system and compare it to the database. I've been there. It's no fun.
Database network calls are very expensive. Its definitely not a good idea to store images in the database.
I disagree. If your database is properly configured, blob retrieval is very fast. Virtually as fast as retrieving the image from a filesystem.
The images are served by the webserver. IMO, images need to stored in the filesytem, preferably webserver filesystem (helps caching)
Images stored in blobs and returned as a
servlet response can be cached at the web layer just as you would cache any other servlet response.
Why do images need commit/rollback i.e to have transaction capabilities? I don't see any business need.
I have an application where updates to images and metadata must be kept synchronized. If you change an image, the associated metadata must be changed as well. If the transaction is rolled back for any reason, all changes must be rolled back including the image change. This particular application is quite complex and images and image metadata are a small part of each entity. There are many business rules that could cause a transaction to abort.
Keeping things simple is difficult, making it complex is easier.
Now
that I agree with!