use DB in image class