Open main menu


MediaWiki extensions manual
OOjs UI icon advanced.svg
Release status: beta
Implementation Ajax, Database
Description Logs image-related metrics from client-side
Author(s) Gergő Tisza (Tgrtalk)
Latest version 0.0.1 (2014-08-20)
MediaWiki 1.24+
PHP 5.3+
Database changes No
License GNU General Public License 2.0 or later
  • $wgImageMetricsSamplingFactor
Translate the ImageMetrics extension if it is available at
Check usage and version matrix.
Issues Open tasks · Report a bug

The goal of the ImageMetrics extension is to log image-related client-side metrics. Currently, the only metric being tracked is the loading time of file page images.

What data is logged?Edit

See the ImageMetricsLoadingTime schema.


The EventLogging extension is required for this extension to work.


The extension can be retrieved directly from Git [?]:

  • Browse code
  • Some extensions have tags for stable releases.
  • Each branch is associated with a past MediaWiki release. There is also a "master" branch containing the latest alpha version (might require an alpha version of MediaWiki).

Extract the snapshot and place it in the extensions/ImageMetrics/ directory of your MediaWiki installation.

If you are familiar with git and have shell access to your server, you can also obtain the extension as follows:

cd extensions/
git clone

Installing / ConfigurationEdit

To enable, add this to your LocalSettings.php:

require_once "$IP/extensions/EventLogging/EventLogging.php";  // required dependency
require_once "$IP/extensions/ImageMetrics/ImageMetrics.php";
$wgImageMetricsSamplingFactor = 10000;  // log 1:10,000 requests.

To install in a MediaWiki-Vagrant development environment, use the imagemetrics role.