This idea actually seems to be a good one. Not sure if the law is worded well enough to stand up to abuse but it actually puts legal definitions around what should be known already: when you end a relationship, it changes how you relate to the things shared with that person.
I'm kinda surprised so many are considering this a "change in consent" or "going back and changing your mind after the fact". It's not. When a relationship changes, the way you relate to that person changes. Another way to think of it is: the consent for sharing intimate things changed when you are no longer intimate with that person....so no "changing your mind" but it's recognizing what already happened.
As far as comments of "if you don't want pictures shared, then don't let them be taken". So, because something might be abused later, don't partake in it? What a sad way to live. Safe yes, but so is never drinking, never leaving the house, etc. Pick your risky behavior and insert here.
Being in a relationship is by definition trusting that person more than others, otherwise it's just, at best, friends with benefits. Ending the relationship is backing down on how much you share with the other person, so of course trusting them with pictures like that has changed.