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?
Flat files are better suited for representing images on web - they have much lower impact on server. OTOH they don't support transactions (actually you might do it with heterogenous transaction) and your data isn't in one place anymore.
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.