John Riley, or Ryley, (1646 – March 1691) was an English portrait painter. He painted portraits of Charles II and James II, and was court painter to William III and Mary II. One of his pupils was Jonathan Richardson.
Riley was born in London, one of the sons of William Ryley, Lancaster Herald and keeper of the records in the Tower of London, who was created Norroy king-at-arms under the Commonwealth, but reverted to his herald's office at the Restoration. Another son, Thomas Riley, was an actor.
Riley studied painting under Isaac Fuller and Gerard Soest, and from the latter learnt a forcible, straightforward style of portraiture which rendered his portraits noteworthy. Riley did not attain much eminence until the death of Sir Peter Lely, when courtier and royal official Thomas Chiffinch sat for him, and was so much pleased with his portrait that he showed it to the king. Charles II gave Riley some commissions, and eventually himself sat for him, apparently saying of the result: "Is this like me? Oddsfish, then I'm an ugly fellow!" Riley also painted James II and Mary of Modena, and, on the accession of William III and Mary II, he was appointed court painter, jointly with Sir Godfrey Kneller, though he only survived for three years after this.