Multiple images are supported according to https://ogp.me/#array.
Facebook suggest an image with at least 1080px.
WhatsApp ignores images >300px.
Bug: T282065
Change-Id: Ibc18df03fbd6f4ec9f4970331e1b5bf930710816
$thumb might be an instance of MediaTransformError, which as the name
implies, is not really usable as a thumbnail and should be skipped
instead.
Bug: T290973
Change-Id: Ie818bd295bfe06c7c0dc0a2ea7dd273c7e0e416f
Replace instances of "blacklist" with "denylist" throughout extension.
Bug: T277955
Depends-On: Ib4985ec2fcb22eafad8f3a7cf9fc3161782a71db
Change-Id: Ibe460cb9691d56a9e83686b53c7629b5404af6fb
As we switch ParserCache to JSON, we can no longer serialized
class instances in extension data. PageImages was writing the
full set of properies it received from Parser into it's extension
data, some of which are sometimes class instances. Instead, only
write the nessessary subset of data into extension-data.
This change is completely forward and backward compatible.
Since before this change we were already writing the same array,
but with many additional unused properties.
Bug: T266251
Change-Id: Ieb4a139465159611e6b3a99c4b68c3c174b1944f
* Images on pages can be localized (eg. SVG text)
* Allow API consumers to select the language the images are rendered in
Bug: T257082
Change-Id: I05f498444c55aea9028a58de80e21ba1e236bf02
SearchResultProvideThumbnail was introduced in T250144. In order to fill
search results with the "thumbnails" field it should be implemented in proper extension.
Bug: T250207
Change-Id: I81d5d70f5237d6399b8ec6bec3058d12e40ca142
Avoid array_map/array_flip + foreach when doing the simple thing also in
the foreach
Swap Title::newFromText to Title::makeTitle to avoid reparsing the
string
Bug: T237068
Change-Id: I745cb9bd817a4b2274c6f778c38c58846ef318c1
The file page for an image should include the `og:image` meta tag. Thus,
a thumbnail is shown for the image when posting a link via social media.
Relates to Ide250d489a1ceedd7e896a3b44471752f0971fb1.
Change-Id: I81435289a4a6c7749462ba447aa626120a9c821c
The hook is called during page move. If you try to fetch the current
page content from the replica, it won't be there with the specified
title, causing an exception.
Bug: T221763
Change-Id: Ib91bf399f251fc715d8f27a4f8f7f4c9db9d30c8
This allows to use floats in the $wgPageImagesScores configuration.
Before, decimal places have just been cut off with no warning. I find
this pretty unexpected. When I see the terminology "score" being used,
I always think of float values. I checked all the code that consumes
these scores (it is all internal to LinksUpdateHookHandler), and it's
all fine with floats. I don't see a reason to forcefully cut decimal
places off.
Bug: T212013
Change-Id: I0f1f0ea0865f07b3e58a2fc142dcd838eb687c97
This patch is motivated by Iad694e0.
* I rearranged the code a little bit to avoid a duplicate line of code.
* I added a ksort() and a comment explaining it.
* Additional tests demonstrate why the ksort() is needed.
* I had to refactor the tests a little bit to allow for more test cases
that have been missing before.
Bug: T212013
Change-Id: Ia96dc8c6cf57ddcea410a7300756d0013052ac79