I understand it is possible to store images in Databases as Binary large objects. But I used to see in some forum web applications that they are stored as flat files in web server machine and retrieved when needed.
What is the advantage and disadvantage in both methods?
When to go for which approach?
As usual, it depends. You need to consider the usage pattern of the images and what features your DBMS provides.
Storing images in the database:
PROS
CONS
Storing images on disk:
PROS
CONS
Of course, all these concerns are particularly valid if you store large numbers of images.