VE-1598: Building gallery ce from dm data