Page MenuHomePhabricator

Change query service image previews from 1000px to 1024px
Closed, ResolvedPublic

Description

As a query service user, I want to see all the images from a query result in order to understand the result better.

Problem:
The WDQS UI’s ImageView currently loads images with a width of 1000px. This is not one of the standard sizes, and so it’s possible that MediaWiki has to resize the image on the fly, and if that happens enough, the user will get rate limited and may not see further images. We should use one of those standard sizes instead (where a resized image is guaranteed or very likely to exist), and 1024px is the closest one.

Example:
This is hard to demonstrate reliably, because it requires images that were never loaded at 1000px before. 500 random images seems to work sometimes.

Screenshots/mockups:

Screenshot_2020-07-17 Wikidata Query Service.png (377×968 px, 463 KB)

BDD
GIVEN A random set of images
WHEN looking at them in the image grid
THEN they can always be loaded

Acceptance criteria:

  • Image width is 1024px instead of 1000px

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald Transcript

I believe the code governing this is in https://gerrit.wikimedia.org/r/plugins/gitiles/wikidata/query/gui/+/refs/heads/master/wikibase/queryService/ui/resultBrowser/ImageResultBrowser.js#245 (lines 245-7)

So we could change

	url = this._getThumbnail( itemData.url, 1000 ),
	fileName = this._getFormatter().getCommonsResourceFileName( url ),
	item = this._getItem( this._getThumbnail( url ), this._getThumbnail( url, 1000 ), fileName, itemData ),

to:

	url = this._getThumbnail( itemData.url, 1024 ),
	fileName = this._getFormatter().getCommonsResourceFileName( url ),
	item = this._getItem( this._getThumbnail( url ), this._getThumbnail( url, 1024 ), fileName, itemData ),

It looks like these two lines are the only place where the 1000px default is specified (at least, they're the only ones I can find)

Lydia_Pintscher subscribed.

Thank you all for investigating! Moving to camp to get it done.

Change 615590 had a related patch set uploaded (by Ladsgroup; owner: Ladsgroup):
[wikidata/query/gui@master] Change image previews from 1000px to 1024px

https://gerrit.wikimedia.org/r/615590

Change 615590 merged by jenkins-bot:
[wikidata/query/gui@master] Change image previews from 1000px to 1024px

https://gerrit.wikimedia.org/r/615590