One of the most toxic poisons to continued inspiration is the sudden belief that your own work is hated by your audience. Online criticism can be a harsh weight on motivation that all photographers must face at one point or another and is something that should almost always be completely ignored.
Online Criticism Lacks Credibility
If for no other reason, you should ignore the negative comments of trolls because they are usually devoid of even the most subtle hint of credibility. If someone you happened to walk by on the street randomly turned to you and told you that you have cancer, would you listen to their advice? About topics such as medicine, physics, or any manner of other careers the automatic presumption is that credibility is a prerequisite to taking someone seriously. With photography, however, we often accept the advice of random viewers as gospel. Never let the uneducated opinion of an Internet cretin chip away at your respect for your own work.
Online Criticism Hides Motivation
Whenever a comment is made, the commenter inherently has a reason why they made that comment. As the receiver of the comment we assume that it is genuine criticism, however most of the time this is likely not the case. There are an endless array of reasons to make a negative comment that has nothing to do with the quality of a photographer's work. The commenter could merely be angry and be looking for an outlet or they could be jealous to try to tear you down. Regardless of the commenter's motivation, the comments themselves are often similar making it very difficult to evaluate whether the comment was genuine criticism or not.
Online Criticism Is Blind to Your Goals
A troll never really has any idea what your own personal goals for your work or each individual photograph is. The troll is only able to see what they expect your photography to be. This creates a situation that almost ensures that the point of view of the troll will be vastly different to what could be considered meaningful feedback on your work.
When looking for genuine feedback on the quality of your work, comment sections on forums or social media are one of the worst places to look. Always make a point to ignore feedback given anonymously as it never really is a reflection of the work being commented on. Instead, look to trusted and credible sources that you can approach who you know will offer genuine critique with the goal of aiding you in your journey as a photographer.