You say it like it is that simple to fix; they could ask for photo in the curriculum and just discard the few that looks old, -after targeting job ads on pages that are disproportionaly "liked" by the age range they want-
The only true way to solve this is to force by law to hire older people (e.g. 30% of your workforce must be over 40); otherwise all this proxies like trying to regulate third-party ads and else its just an endless cat-and-mouse game.