It’s a gray area imo, there is no way of obtaining meaningful consent from those children, even if they are your own, but in the same vein the photographs are presumably one-off and not strongly associated with their identity as they grow, causing the privacy aspect to almost become a non-issue in the long term.