starcitizenwiki/picture-html-support

There is no license information available for the latest version (1.0.0) of this package.

A MediaWiki extension that wraps thumbnails with picture elements, and allows adding additional source elements

Installs: 836

Dependents: 0

Suggesters: 0

Security: 0

Stars: 3

Watchers: 3

Forks: 0

Open Issues: 4

Type:mediawiki-extension

pkg:composer/starcitizenwiki/picture-html-support

1.0.0 2023-08-07 17:37 UTC

README

The PictureHtmlSupport enhances MediaWiki thumbnails on wiki page with <picture> elements. It does these things:

  1. Wrap thumbnail <img> element with <picture> element
  2. Move resposive image definition to <source> element if enabled
  3. Introduce the PictureHtmlSupportBeforeProduceHtml hook for users to add additional <source> elements
  4. Add a hidden <a> element next to the thumbnail HTML so web crawlers can crawl the original resolution image (https://phabricator.wikimedia.org/T54647)

Installation

  1. Add the following line to LocalSettings.php:

    wfLoadExtension( 'PictureHtmlSupport' );
  2. Replace includes/media/ThumbnailImage.php (make a backup!) with includes/ThumbnailImage.php from this extension.