Except it's not true, as various Tolkien scholars (most notably Manfred Zimmerman) discovered: the Madlener painting actually dates from the mid to late 1920s and could not have been purchased during that 1911 trip.* The dating is important because there's still some debate about whether Tolkien started THE HOBBIT in the summer of 1930 (as I believe) or sometime in the 1920s (as a minority opinion holds). If we cd date this image and also date when Tolkien first came across it, it might narrow down the field a little.
Now comes a new suggestion breathtaking in its simplicity, in the essay "Merlin, Odin, and Mountain Spirits: The Story of Gandalf's Origins" by Leila K. Norako, in the otherwise somewhat disappointing collection THE HOBBIT AND HISTORY.** Norako suggests
by saying that Der Berggeist was the origin of Gandalf,
Tolkien could easily have been pointing to the broader
Rubezahl tradition as source of inspiration rather than
to Medlener's specific rendering of the figure (p. 168)
That is, what if it's not the Madlener image that Tolkien meant by 'Origin of Gandalf' but the thing represented: Der Berggeist itself? If that were the case then Tolkien's annotation could be entirely accurate and yet be of no help dating THE HOBBIT whatsoever.
Of course we can always assume Tolkien came across this picture at some point after beginning THE HOBBIT and simply though it a good likeness, but I'm reluctant to accept that explanation because it directly contradicts Tolkien's simple and straightforward statement that in some way the Berggeist was the 'origin' of Gandalf.
In any case, an interesting suggestion, I thought; one I've not seen before, and one I'll have to mull over.
*For a good account of the Madlener painting, see Doug Anderson's THE ANNOTATED HOBBIT pages 36-39; this book also reproduces Madlener's original in color on the lower half of Plate 5 (between pages 178 and 179).
**not because the essays aren't well done but because of a kind of diminishing returns: I've read so many essay already on the topics included herein (e.g., Beorn and Bothvar Bjarki) that I already knew most of what they had to tell me.