Before you can answer this question let's address a number of other issues first.
All of us are drawn to the guitar for many reasons and objectives. For most, it's safe to say, the desire to play for our own benefit is the primary reason for investing the many hours it takes to become proficient. It is an avocation; a fun way to challenge yourself. We have no intentions of playing the instrument in front of a group or in a group. If we do, it is invariably around the fireplace, campsite or at the church social. Others truly do wish to become good enough to participate in a group and look to incremental income as a gage of how well they are doing. Finally, some are determined to play the best music halls in the country or rock stadiums throughout the world. Which is it for you?
The learning process itself can dictate the approach you take regarding training. I venture to say that most who are intrigued by the guitar start by learning a few chords to determine if this is something they want to continue. Today, those chords and how to form them, more often than not, come from the internet in the form of tabs or videos. You should determine if self training is for you. Look into your past. Do you tend to go it alone when learning new skills or procedures? Do you have the self discipline to push yourself past plateaus?
There certainly is not a lack of self proclaimed guitar teachers/instructors on the internet these days. Don't get me wrong. Many of these guitarists are quite accomplished and capable. In fact, some have created very ingenious methods of using video techniques to assist the viewer while trying to replicate the chord or riff being demonstrated. That said this approach requires the student to apply themselves. Remember, there is no instructor feedback only a one way communication. Do you find that you need feedback while learning something new?
For most guitarists, having the ability to successfully play enough chords to entertain themselves and a few others is sufficient. We all know that with 4-5 chords under your belt, you have access to thousands of songs many of which are very recognizable to the listener. But for some, that is just not enough. They want to understand the theory involved. Understanding the underpinnings music is important to them. How to read music, recognize keys, etc. is part of becoming a well rounded guitarist and musician, in their mind. If you are this type of person, are you able to drill down into the "technicalities" of music theory? Do you have the motivation and resources to do this on your own? Is it wise to consider doing so? Is music instruction part of your future interests?
A wonderful aspect of playing guitar today is the availability of fine instruments at very reasonable prices. That means that for very little cash outlay, a student can begin the learning process without significant financial hardship. Talk to an aspiring piano player for the opposite view of this issue. In addition, an incredible amount of virtually free training information, written and in video format is available via the internet, especially vehicles such as YouTube, etc. Do you have the resources to pursue music training beyond these sources and for a fee? It is important to answer this question honestly since so many students find that shortly after choosing a music teacher, the expense becomes an issue. Remember, music instructors not only have a right to expect proper payment for their knowledge but truly deserve the fees that they require.
So, is a music teacher the best way for you to learn guitar?
Well, if you are determined to become the best player possible, in the shortest time; may not have the needed self discipline necessary or inclination to self train; music theory is considered essential and you have the resources to pay for your needs, then, yes, you should seek a music teacher/instructor. That is not to say to you should abandon the wealth of knowledge and tools available elsewhere to compliment this process.