Restore accidentally deleted inventory_imgsize calculation