In painting, a capriccio (Italian pronunciation: [kaˈprittʃo] , plural:capricci [kaˈprittʃi] ; in older English works often anglicized as "caprice") means an architectural fantasy, placing together buildings, archaeological ruins and other architectural elements in fictional and often fantastical combinations. These paintings may also include staffage (figures). Capriccio falls under the more general term of landscape painting. The term is also used for other artworks with an element of fantasy (as capriccio in music). This style of painting was introduced in the Renaissance and continued into the Baroque.
There are several etymologies that have been put forward for "capriccio", one of which being derived from the Italian word "capretto" which roughly translates to the unpredictable movement and behavior from a young goat. This etymology suggests that the art style is unpredictable and as open as the imagination can make it.
Filippo Baldinucci defined capriccio as a dreamlike interpretation of the subject of a work that comes from a free imagination.  Capriccio works often surround architecture that has been changed with pieces of a view that has taken artistic liberty into account. Capriccio often takes existing structures and places them into re-imagined settings and characteristics. The paintings can be anything from re-imagining a building in the future as ruins, to placing a structure in a completely different setting than that in which it exists in reality. The subjects of capriccio paintings cannot be taken as an accurate depiction due to the fantastical nature of the genre.
Architect David Mayernik cites 4 themes that are found in capricci: 
When artists were commissioned to create a painting of an architectural piece, they were not necessarily concerned with accurate representation of a building. Rather, they could be freer in terms of interpretation and artistic license.  This allowed the artist to add decorations or other architectural features at their own discretion. This artistic freedom in capriccio allows continual transformation of a building. This was aided by the fact that architecture commonly is composed of strong lines, both horizontal and vertical that can be analogous to other architectural works, making it possible to take parts of other architectural works and fit them into the new artistic view of a particular building that was being recreated in the form of capriccio. Some artists took elements that didn't belong in the original inspiration such as people, animals, or plants and incorporated them into the work.  It is important to remember that in the realm of capriccio, a painting of a building is not a record or history, but is a piece of artwork before anything. 
As paintings of capriccio were recreated by different artists, the original form of the subject was able to move farther from reality. According to art historian David R. Marshall, recreated or inspired paintings that are far removed from the original bear no obvious connection. This further allowed artists to take liberty with architectural renditions. Capriccio is thought to be a form of art that appeals to the aesthetics of the viewer by taking liberty with extravagance that eventually turned into art that was intentionally fantastical in regards to the original architectural piece. 
The predecessor of this type of decorative architectural paintings can be found in 16th-century Italian painting, and in particular in the architectural settings that were painted as the framework of large-scale frescoes and ceiling decorations known as 'quadratture'. These architectural elements gained prominence in 17th-century painting to become stand-alone subjects of easel paintings. 
Early practitioners of the genre who made the genre popular in mid-17th century Rome included Alessandro Salucci and Viviano Codazzi. These artists represent two different approaches to the genre: Codazzi's capricci were more realistic than those of Salucci who showed more creativity and liberty in his approach by rearranging Roman monuments to fit his compositional objectives.  The 'quadratture' frescoes of Agostino Tassi and the urban views of Claude Lorrain and Herman van Swanevelt, which he saw in Rome, may have stimulated Viviano Codazzi to start painting capricci. 
A well known proponent of capriccio was the artist Giovanni Paolo Pannini (1691–1765). This style was extended in the 1740s by Canaletto in his etched vedute ideali, and works by Piranesi and his imitators.
Later examples include Charles Robert Cockerell's A Tribute to Sir Christopher Wren and A Professor's Dream, and Joseph Gandy's 1818 Public and Private Buildings Executed by Sir John Soane. The artist Carl Laubin has painted a number of modern capriccios in homage to these works. 
Further fantastical expansions can be seen in the Capricci, an influential series of etchings by Gianbattista Tiepolo, who reduced the architectural elements to chunks of classical statuary and ruins, among which small groups made up of a cast of exotic and elegant figures of soldiers, philosophers and beautiful young people go about their enigmatic business. No individual titles help to explain these works; mood and style are everything. A later series was called Scherzi di fantasia – "Fantastic Sketches". His son Domenico Tiepolo was among those who imitated these prints, often using the term in titles.
Goya's series of eighty prints Los Caprichos , and the last group of prints in his series The Disasters of War , which he called "caprichos enfáticos" ("emphatic caprices"), are far from the spirit of light-hearted fantasy the term usually suggests. They take Tiepolo's format of a group of figures, now drawn from contemporary Spanish life, and are a series of savage satires and comments on its absurdity, only partly explicated by short titles.
Giovanni BattistaPiranesi was an Italian Classical archaeologist, architect, and artist, famous for his etchings of Rome and of fictitious and atmospheric "prisons". He was the father of Francesco Piranesi and Laura Piranesi.
Giovanni Antonio Canal, commonly known as Canaletto, was an Italian painter from the Republic of Venice, considered an important member of the 18th-century Venetian school.
Giovanni Battista Tiepolo, also known as GiambattistaTiepolo, was an Italian painter and printmaker from the Republic of Venice who painted in the Rococo style, considered an important member of the 18th-century Venetian school. He was prolific, and worked not only in Italy, but also in Germany and Spain.
Giovanni Domenico Tiepolo was an Italian painter and printmaker in etching. He was the son of artist Giovanni Battista Tiepolo and elder brother of Lorenzo Baldissera Tiepolo.
Viviano Codazzi was an Italian architectural painter who was active during the Baroque period. He is known for his architectural paintings, capricci, compositions with ruins, and some vedute. He worked in Naples and Rome. He is known in older sources as Viviano Codagora or il Codagora.
Michelangelo Cerquozzi, known as Michelangelo delle Battaglie was an Italian Baroque painter known for his genre scenes, battle pictures, small religious and mythological works and still lifes. His genre scenes were influenced by the work of the Flemish and Dutch genre artists referred to as the Bamboccianti active in Rome who created small cabinet paintings and prints of the everyday life of the lower classes in Rome and its countryside. One of the leading battle painters active in Italy in the first half of the 17th century, Michelangelo Cerquozzi earned the nickname 'Michelangelo delle Battaglie'.
François de Nomé was a French painter of the Baroque period, active mainly in Naples.
Jan Miel was a Flemish painter and engraver who was active in Italy. He initially formed part of the circle of Dutch and Flemish genre painters in Rome who are referred to as the 'Bamboccianti' and were known for their scenes depicting the lower classes in Rome. He later developed away from the Bamboccianti style and painted history subjects in a classicising style.
Events from the year 1668 in art.
Marco Ricci was an Italian painter of the Baroque period.
Venetian painting was a major force in Italian Renaissance painting and beyond. Beginning with the work of Giovanni Bellini and his brother Gentile Bellini and their workshops, the major artists of the Venetian school included Giorgione, Titian, Tintoretto (1518–1594), Paolo Veronese (1528–1588) and Jacopo Bassano (1510–1592) and his sons. Considered to give primacy to colour over line, the tradition of the Venetian school contrasted with the Mannerism prevalent in the rest of Italy. The Venetian style exerted great influence upon the subsequent development of Western painting.
Italian Rococo art refers to painting and the plastic arts in Italy during the Rococo period, which went from about the early/mid-18th to the late 18th century.
The art collections of Fondazione Cariplo are a gallery of artworks with a significant historical and artistic value owned by Fondazione Cariplo in Italy. It consists of 767 paintings, 116 sculptures, 51 objects and furnishings dating from the 1st century to the second half of the 20th century.
Gennaro Greco also known as "Il Mascacotta" (1663–1714) was an Italian architectural painter who was active in Naples during the late Baroque period. He is known for his architectural paintings, capricci, compositions with ruins, as well as his vedute. His vedute fall mostly in the category of the so-called vedute ideate which represent closely observed views of completely imaginary landscapes.
Jacobus Ferdinandus Saey or Jacob Ferdinand Saeys was a Flemish painter who specialized in architectural paintings depicting gallant companies amidst imaginary Renaissance and Baroque palaces and buildings. After starting his career in Flanders, he moved to Vienna, where he worked for the rest of his life.
Alessandro Salucci was an Italian painter who played an important role in the development of the genre of cityscapes (vedute) of Rome. He created capricci, i.e. imaginary architectural perspectives and harbour views, in which the figures were often executed by another artist.
Niccolò Codazzi was an Italian painter of architectural paintings, capricci and vedute. He also created decorative elements in frescos as a painter of 'quadratura'. A son of the prominent architectural painter Viviano Codazzi, he trained with his father and was active in Rome, Paris and Genoa.
Vicente Giner was a Spanish canon and painter of architectural paintings, capricci and vedute, who was active in Rome. He was a frequent collaborator of the prominent architectural painter Viviano Codazzi in Rome.
Ascanio Luciano or Ascanio Luciani was an Italian architectural painter who was active during the Baroque period. He is known for his architectural paintings, capricci, compositions with figures among ruins, and some vedute. He worked in Naples throughout his career. He is regarded as playing an important a hinge role in the genre of architectural capricci between leading founders of the genre such as Viviano Codazzi and François de Nomé and the 18th-century specialists of the genre.
Jan Baptist van der Straeten was a Flemish painter who specialized in architectural paintings depicting gallant companies amidst imaginary Renaissance and Baroque palaces and buildings.
17th and 18th century Italian Ruin Paintings: Picturing the Past and Its Remains
Media related to Capriccios at Wikimedia Commons