images added to db : glitches when run in background