PHP Function to validate setting

So how would you go about storing images IN the database then (which is essential once you get a larger system using transactions) if you don’t store them as blobs?