Do you have to be “attractive” for someone to buy your book? No. Will you get more media attention for your book if you’re traditionally good looking? Possible.
My take is this: if you’re attractive, it can help your chances. If you’re unattractive, it can’t hurt. I’ve never picked up a book and thought, “Yikes! Not gonna read a book by that!” I honestly don’t think author photos make anyone buy or not buy a book in the bookstore. At most, it’s the very last thing that tips a buyer into the “yes” or “no” column.
So for all you gorgeous souls out there, there’s one more reason to thank genetics. The rest of us will carry on depending on our supreme intellect and prodigious talent.