You're relying on logical alignment to regulate your morals. Well it's biased because it can go both ways. For the direction opposite to your query one can logically say: "Dick pics on the internet are ok why isn't flashing your dick ok in public?" You simply chose the direction that fits with your bias.
The reality is common sense is the best choice here. There is no alignment when obviously your gut tells you flashing your dick in public is much worse then a dick pic.
That gut feeling that regulates that feeling is the same feeling that tells us that while porn is ok to be all over the internet, it's not ok for porn scenes to be played in public.
Unsolicited indecent exposure is sexual harassment.