Page MenuHomePhabricator

Include regular page links when determining unused images
Open, LowPublicFeature

Description

Author: dodgy

Description:
There's the unused images special page. Well sometimes images are linked to from articles, etc. It would
be nice if MediaWiki could add a simple search in there to crossreference unused images with images
thare are both unused and not linked anywhere.

Obviously links from category pages would be excluded because well they shouldn't count.

This should be just some easy MySQL cross-search.


Version: unspecified
Severity: enhancement

Details

Reference
bz8588

Event Timeline

bzimport raised the priority of this task from to Low.Nov 21 2014, 9:32 PM
bzimport set Reference to bz8588.
bzimport added a subscriber: Unknown Object (MLST).

robchur wrote:

I'm not sure that this is quite the intended purpose of the page; an image is
"used" if it appears on some page.

dodgy wrote:

Maybe an orphaned images page?

dodgy wrote:

Basically a cross search for images that both:

  1. Those already in Special:Unusedimages
  2. Those not linked to from anything except category pages.

That simple.

dodgy wrote:

Another good thing is if "Unused files" could sort images by category.

cnit wrote:

One of my wiki has pages that use a lot of image links like this one [[:Image:file.jpg]]

Wiki users were really surprised to find the following message on Image:file.jpg page:
"There are no pages that link to this file"
when there might be many pages actually likning to it.

On Special:Unusedimages there's at least a warning:
"Please note that other web sites may link to a file with a direct URL,
and so may still be listed here despite being in active use."

On the image page you have to figure out to use "What links here" - some
users might forget about that and it's a one more click. That's very unhandy
to such wikies. Also, Image: page becomes less informative.

Images are linked with url links [[:Image:file.jpg]] because there's
many of them in the text sometimes. Also, the Image page has detailed
description of the image.

I've made a hack, which allows to optionally include such links in
statistics on Image: page. It's not too big and doesn't affect
existing installations. I hope it can be reviewed and integraded into
SVN, possibly with required fixes.

cnit wrote:

This patch allows to see usage of image pagelinks in statistics on Image: page

set
$wgImagePageLinks=true;
in LocalSettings.php
to enable it.

attachment ImagePage.php.patch ignored as obsolete

cnit wrote:

This patch allows to see usage of image pagelinks in statistics on Image: page

set
$wgImagePageLinks=true;
in LocalSettings.php
to enable it.

attachment ImagePage.php.patch ignored as obsolete

sumanah wrote:

Dmitriy, thank you for writing this patch, and sorry that it's taken so long to reply! Could you please check to see whether the current version of MediaWiki (in Subversion trunk) still has this problem, and whether your patch still cleanly applies to trunk? Thanks!

sumanah wrote:

Dmitriy, I'm sorry to say that your patch doesn't cleanly apply to MediaWiki's codebase anymore. I'm marking it obsolete and removing the patch & need-review keywords. If the problem is still happening in the current version of MediaWiki, would you be interested in revising your patch? Thanks!

sumanah wrote:

Comment on attachment 5445
This patch allows to see usage of image pagelinks in statistics on Image: page

Per automated testing
http://lists.wikimedia.org/pipermail/wikitech-l/2011-November/056340.html patch
no longer applies to MediaWiki trunk in Subversion. I'm sorry for the delay in review.

Aklapper changed the subtype of this task from "Task" to "Feature Request".Feb 4 2022, 11:01 AM
Aklapper removed a subscriber: wikibugs-l-list.