since the picture is referenced from the database, why don't you delete it at the same time the database entry is removed?