Now that RESTBase returns the original image with each page summary endpoint request, we should make use of it to construct thumbnails on the client with the dimensions we need. Originally, RESTBase would only return images up to 300px wide, which considering device DPI would be hidden because of [[ https://github.com/wikimedia/mediawiki-extensions-Popups/blob/mpga/resources/ext.popups/renderer.js#L346 | some logic]] in Page Previews.
[[https://en.wikipedia.org/api/rest_v1/page/summary/Barack_Obama | Here]] is the new format from RESTBase:
"title": "Barack Obama",
"extract": "Barack Hussein Obama II (US /bəˈrɑːk huːˈseɪn oʊˈbɑːmə/ bə-RAHK hoo-SAYN oh-BAH-mə; born August 4, 1961) is an American politician who served as the 44th President of the United States from 2009 to 2017. He was the first African American to serve as president, as well as the first born outside the contiguous United States. He previously served in the U.S. Senate representing Illinois from 2005 to 2008, and in the Illinois State Senate from 1997 to 2004.\nObama was born in Honolulu, Hawaii, two years after the territory was admitted to the Union as the 50th state. He grew up mostly in Hawaii, but also spent one year of his childhood in Washington State and four years in Indonesia.",
"description": "44th President of the United States of America"
Notice the new `originalimage` object. We should use this to construct thumbnails of [[ https://github.com/wikimedia/mediawiki-extensions-Popups/blob/mpga/resources/ext.popups/gateway.js#L6 | width used in the existing MediaWiki API end point]].
* Visit a page https://en.wikipedia.beta.wmflabs.org
* Hover over links that point to pages with images and make sure Page Preivews show images.
* Visit https://en.wikipedia.beta.wmflabs.org/wiki/T156800
* Verify that the thumbnails show up properly work properly
* Popups-small-svg-thumbnail: Red cross
* PreviewsNonFreeImage/sandbox: Fedora logo