He went into exile during the Peninsular War. In 1811, Ribera was appointed court painter by the exiled Charles IV of Spain, whom he accompanied to Rome, where he was appointed a member of the Accademia di San Luca. After King Ferdinand VII of Spain returned to Spain, Ribera was later confirmed as court painter in 1816, although he remained in Rome until 1818 painting works he had already been commissioned for.
Museo del Prado
In 1820 Vicente López y Portaña established the Museo del Prado. Ribera's tenure as director of the same organization began in 1857, replacing José de Madrazo y Agudo. In his term the Museum published the fifth catalog of works (1858), in force until the publication of the sixth in 1872. In 1857 he was appointed First Court Painter by Isabel II of Spain. He died in Madrid on June 15, 1860.