I've posted a modified version of this on another recent thread on the forum about ferry piloting...
The FAA's rules for compensation of a private pilot are sufficiently vague so as to support both arguments. Good-will and flight time as compensation lean in the FAA's favor whereas hotel, meals, commercial airline tickets and other "incidental" expenses lean in the pilot's favor. It becomes a question of what is incidental to the flight and what is a required part of the flight and what are the motives behind a dozen other decisions.
That's how the popular youtuber's are making their money with/without commercial pilot certificates. They are arguing that the flight is not where they are deriving their revenue but rather they are paid and sponsored for the video content they produce. That may be true but flying is central to their video content, remove flying from the video and the number of viewers and revenue is likely to drop significantly. That's probably a big reason why we've seen a lot of youtuber's get into other alternative ground content; if their channel has a good number of ground videos mixed in with flight content, it becomes harder for the FAA to say they are making money from the flying but I digress...
They are flying with the intent to produce video content that they then derive a profit from. Their motives for the flight can be described as largely profit driven. The issue in particular with video content vs static photo content is that it is more than just the aerial footage, there are voice overs, cut scenes, non-flying portions and editorial comments not to mention the entire editing process where portions of the flight get cut or rearranged... This is where things get complicated but the argument largely follows the 51% rule; that is to say they editorialize the video enough that the majority of the content, at least 51%, in the video is distinct from the flight itself therefore less than half the video was created from the flight.
Since their is no generation of additional content (editing is not in and of itself creating new content) in the creation of static imagery, I would say your first flight was fine. You took the flight, took pictures on the flight and then were approached about being paid for the photo. Your intent of the flight lacked a profit motive and even taking the picture had no profit motive... Things change however on your second flight as you are now taking off with the express intent of taking photos to sell.
There are many highly nuanced situations that can change significantly with only 1 or 2 seemingly small details... Take flying with friends as an example. If I take my friends up flying because they want to go, then I am technically being compensated for the flight in the form of goodwill with my friends. If I want to go and my friends come along, then I am not being compensated for the flight. If my friends and I both want to go, then I can be compensated the pro-rata portion of the flight but after the flight is over, while we're out maybe my friends decide to buy me dinner... Are they compensating me for the flight, just being good friends or trying to get my good will? It all becomes very grey very quickly.
Another example where lines get blurred and it becomes difficult to say where the line is and whether its been crossed... My friends buy and gift me a game to the football game in the next state over that they are also going to. As a result of now needing transportation to the game I decide I am going to fly and extend the offer to fly to my friends. Our destination/purpose of flight is aligned so legally I can accept pro-rata pay for the flight but did the original gift of the ticket qualify as compensation not only in excess of the pro-rata portion but in a wider perspective as well? If I didn't have the ticket, I wouldn't have reason to make the flight and probably wouldn't have offered to fly...
It all comes down to motives and its not just the pilots motives that matter. Maybe my friends bought me the ticket for the game to gain good will with the expectation that I might offer to fly them or maybe they didn't. Convincing an ALJ that the ticket was a no-strings attached gift would require other mitigating circumstances such as a recent birthday or proof that they were going to travel to the game by other means which can be difficult to prove; ultimately with ALJ's unlike criminal law you are often guilty until proven innocent.
Its the same issue the FAA had with that true ride-sharing site for pilots a few years ago... Even some of the commercial pilots on that site got in trouble because the FAA felt that the pilots were offering trips they had little intention of going on without a passenger to split costs with or they were accepting and going on trips they otherwise would not have taken if they did not have a passenger looking for the same and therefore crossed the line of holding out.
As is typical of a government agency, the FAA shows a huge cognitive dissonance in allowing pilots a lot of discretion in things like log books and PIC safety-pilots while at the same time treating pilots like 3-year olds that will lie, cheat and steal their way to flight time in other instances such as compensation arguments or medicals.