# NSFileRepo - Images can't be viewed within Media Viewer

**URL:** <https://community.bluespice.com/t/nsfilerepo-images-cant-be-viewed-within-media-viewer/438>\
**Category:** Discussion/Misc\
**Created:** [August 12, 2026, 7:08am UTC](https://community.bluespice.com/t/nsfilerepo-images-cant-be-viewed-within-media-viewer/438 "2026-08-12T07:08:44Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![onlygecko](https://avatars.discourse-cdn.com/v4/letter/o/49beb7/32.png) [@onlygecko](https://community.bluespice.com/u/onlygecko)\
**Post date:** [August 12, 2026, 7:08am UTC](https://community.bluespice.com/t/nsfilerepo-images-cant-be-viewed-within-media-viewer/438/1 "2026-08-12T07:08:44Z")

</div>

Hi there,

we have an issue with the Media Viewer when using the NSFileRepo plugin. Though I’m not sure if it’s a bug or if it’s me having an issue with the configuration.

I’ve uploaded a new image (file) e.g. “PIMCORE:pimcore-logo.svg”.

- When accessing the file page `.../index.php/Datei:PIMCORE:Pimcore-Logo.svg` the image on the file page is correctly embedded and visible.
- The image is displayed correctly when clicking on _Original File_ (on the file page) `.../nsfr_img_auth.php/104/8/8d/Pimcore-Logo.svg`
- I get a “file does not exist” error when clicking on _Open in Media Viewer_ (on the file page)
  - The URL which is beeing called is: `.../index.php?title=PIMCORE:Übersicht#/media/Datei:Pimcore-Logo.svg` The namespace part of the file name is missing

We use the following versions:

Mediawiki: 1.43.9  
NSFileRepo: 3.0.11 (c6ca720), 08:40, 16. Jun. 2026

Has anyone an idea what the cause of the issue could be?

Thanks for your anwsers in advance. 🙂  
Peter

 ![image](https://europe1.discourse-cdn.com/flex017/uploads/bluespice/original/1X/f01631616e9cd75e14d44ea4ca7e90229181018f.png)

---

<div class="post-metadata">

**Author:** ![rvogel](https://avatars.discourse-cdn.com/v4/letter/r/eada6e/32.png) [@rvogel](https://community.bluespice.com/u/rvogel)\
**Post date:** [August 12, 2026, 12:31pm UTC](https://community.bluespice.com/t/nsfilerepo-images-cant-be-viewed-within-media-viewer/438/2 "2026-08-12T12:31:33Z")

</div>

Hello and welcome to the Community Forums!

That’s a known incompatibility between Extension:NSFileRepo and Extension:MultimediaViewer. Thise patches should work:

`extensions/MultimediaViewer/resources/mmv.bootstrap/mmv.bootstrap.js`

```auto
diff --git a/resources/mmv.bootstrap/mmv.bootstrap.js b/resources/mmv.bootstrap/mmv.bootstrap.js
index 3abb67e1..1646af24 100644
--- a/resources/mmv.bootstrap/mmv.bootstrap.js
+++ b/resources/mmv.bootstrap/mmv.bootstrap.js
@@ -276,7 +276,7 @@ class MultimediaViewerBootstrap {
			// if this is a PDF filetype thumbnail, it can trick us,
			// so we short-circuit that logic and use the file page title
			// instead of the thumbnail logic.
- title = mw.Title.newFromText( mw.config.get( 'wgTitle' ), mw.config.get( 'wgNamespaceNumber' ) );
+ title = mw.Title.makeTitle( mw.config.get( 'wgNamespaceNumber' ), mw.config.get( 'wgTitle' ) );
		} else {
			title = mw.Title.newFromImg( $thumb );
		}
@@ -329,7 +329,56 @@ class MultimediaViewerBootstrap {
			// no longer supported
			'[typeof*="mw:Image"]'
		);
- const title = mw.Title.newFromImg( $thumb );
+
+ /**
+ * nsfr_img_auth.php/3000/e/ea/Image.png
+ * nsfr_img_auth.php/thumb/4/4c/Image.png/300px-Image.png
+ * nsfr_img_auth.php/thumb/archive/3000/e/ea/20250326041929!Image.png/300px-Image.png
+ */
+ const src = decodeURI( thumb.src );
+ const parts = src.split( '/' );
+
+ let title;
+ let isArchive;
+ let namespaceNumber;
+ let namespaceName;
+ let fileName;
+ let timestamp;
+
+ parts.forEach( ( part, index ) => {
+ if ( part === 'archive' ) {
+ isArchive = true;
+ } else if ( /^\d{4}$/.test( part ) ) {
+ namespaceNumber = part;
+ } else if ( part.length === 2 && parts[index - 1].length === 1 ) {
+ // /e/ea/filename
+ fileName = decodeURIComponent( parts[index + 1] );
+ }
+ } );
+
+ if ( isArchive && fileName && fileName.includes( '!' ) ) {
+ const archiveFileName = fileName.split( '!' );
+ timestamp = archiveFileName[0];
+ fileName = archiveFileName[1];
+ }
+
+ if ( namespaceNumber ) {
+ const formattedNamespaces = mw.config.get( 'wgFormattedNamespaces' );
+ namespaceName = formattedNamespaces[namespaceNumber];
+ fileName = `${ namespaceName }:${ fileName }`;
+ }
+
+ // File = 6
+ title = mw.Title.makeTitle( 6, fileName );
+
+ if ( !title ) {
+ title = mw.Title.newFromImg( $thumb );
+ }
+
+ if ( isArchive && timestamp ) {
+ title.timestamp = timestamp;
+ }
+
		let caption;
 
		if ( !this.isValidExtension( title ) ) {

```

`extensions/MultimediaViewer/resources/mmv/provider/mmv.provider.ImageInfo.js`

```auto
diff --git a/resources/mmv/provider/mmv.provider.ImageInfo.js b/resources/mmv/provider/mmv.provider.ImageInfo.js
index e8302b1f..445d071c 100644
--- a/resources/mmv/provider/mmv.provider.ImageInfo.js
+++ b/resources/mmv/provider/mmv.provider.ImageInfo.js
@@ -91,7 +91,7 @@ class ImageInfo extends Api {
	 * @return {jQuery.Promise} a promise which resolves to an Image object.
	 */
	get( file ) {
- return this.getCachedPromise( file.getPrefixedDb(), () => this.apiGetWithMaxAge( {
+ const params = {
			formatversion: 2,
			action: 'query',
			prop: 'imageinfo',
@@ -100,7 +100,16 @@ class ImageInfo extends Api {
			iiextmetadatafilter: this.iiextmetadatafilter,
			iiextmetadatalanguage: this.options.language,
			uselang: 'content'
- } ).then( ( data ) => this.getQueryPage( data ) ).then( ( page ) => {
+ };
+
+ if ( file.timestamp ) {
+ // To get the old image we have to reduce the timestamp and set the iistart for the imageinfo api.
+ params.iistart = file.timestamp -1;
+ }
+
+ return this.getCachedPromise( file.getPrefixedDb() + ( file.timestamp || '' ), () => this.apiGetWithMaxAge(
+ params
+ ).then( ( data ) => this.getQueryPage( data ) ).then( ( page ) => {
			if ( page.imageinfo && page.imageinfo.length ) {
				return ImageModel.newFromImageInfo( file, page );
			} else if ( page.missing === true && page.imagerepository === '' ) {

```

`extensions/MultimediaViewer/resources/mmv/provider/mmv.provider.ThumbnailInfo.js`

```auto
diff --git a/resources/mmv/provider/mmv.provider.ThumbnailInfo.js b/resources/mmv/provider/mmv.provider.ThumbnailInfo.js
index a3d742a3..0e698376 100644
--- a/resources/mmv/provider/mmv.provider.ThumbnailInfo.js
+++ b/resources/mmv/provider/mmv.provider.ThumbnailInfo.js
@@ -50,9 +50,9 @@ class ThumbnailInfo extends Api {
	get( file, sampleUrl, width, height ) {
		const match = sampleUrl.match( /(lang|page)([\d\-a-z]+)-(\d+)px/ ); // multi lingual SVG or PDF page
		const iiurlparam = match ? `${ match[1] }${ match[2] }-${ width }px` : undefined;
- const cacheKey = [file.getPrefixedDb(), width || '', height || '', iiurlparam || ''].join();
+ const cacheKey = [file.getPrefixedDb(), width || '', height || '', iiurlparam || '', file.timestamp || ''].join();
 
- return this.getCachedPromise( cacheKey, () => this.apiGetWithMaxAge( {
+ const params = {
			formatversion: 2,
			action: 'query',
			prop: 'imageinfo',
@@ -61,7 +61,15 @@ class ThumbnailInfo extends Api {
			iiurlparam,
			iiurlwidth: width,
			iiurlheight: height
- } ).then( ( data ) => this.getQueryPage( data ) ).then( ( page ) => {
+ };
+
+ if ( file.timestamp ) {
+ params.iistart = file.timestamp - 1;
+ }
+
+ return this.getCachedPromise( cacheKey, () => this.apiGetWithMaxAge(
+ params
+ ).then( ( data ) => this.getQueryPage( data ) ).then( ( page ) => {
			let imageInfo;
			if ( page.imageinfo && page.imageinfo[0] ) {
				imageInfo = page.imageinfo[0];

```

Actually, I don’t think all of them are required for this particular case. Some may be for better support of “archived image versions” (e.g. when using Extension:FlaggedRevs or Extension:ContentStabilization)

---

<div class="post-metadata">

**Author:** ![onlygecko](https://avatars.discourse-cdn.com/v4/letter/o/49beb7/32.png) [@onlygecko](https://community.bluespice.com/u/onlygecko)\
**Post date:** [August 13, 2026, 8:09am UTC](https://community.bluespice.com/t/nsfilerepo-images-cant-be-viewed-within-media-viewer/438/3 "2026-08-13T08:09:24Z")

</div>

Hi @rvogel ,

thanks for the warm welcome and the patches! They work. 😊

Sorry for the follow up question but there still seems to be in issue. I’ve embedded the photo within a Mediawiki page like this: `[[Datei:PIMCORE:Pimcore-Logo.svg|mini]]`. When I’m in viewing mode and clicking on the photo, the MediaViewer overlay opens and I still get the “file does not exists” error.

Do I need to apply another patch?

 ![image](https://europe1.discourse-cdn.com/flex017/uploads/bluespice/original/1X/7775ecc03f1de107eb84e323149ef174225cfbc0.png)

 ![image](https://europe1.discourse-cdn.com/flex017/uploads/bluespice/original/1X/2a349fbd6fc5cff63ecb7243177a78b2d4f2ee63.png)

---

<div class="post-metadata">

**Author:** ![rvogel](https://avatars.discourse-cdn.com/v4/letter/r/eada6e/32.png) [@rvogel](https://community.bluespice.com/u/rvogel)\
**Post date:** [August 13, 2026, 8:29am UTC](https://community.bluespice.com/t/nsfilerepo-images-cant-be-viewed-within-media-viewer/438/4 "2026-08-13T08:29:20Z")

</div>

Can you maybe share the URL it is trying to fetch? Maybe you could provide some HAR file. See [How to debug - BlueSpice Helpdesk](https://en.wiki.bluespice.com/wiki/How_to_debug#Network_panel:_Record_complete_communication) for instructions.

I believe this may be related to the “thumb url”.

---

<div class="post-metadata">

**Author:** ![onlygecko](https://avatars.discourse-cdn.com/v4/letter/o/49beb7/32.png) [@onlygecko](https://community.bluespice.com/u/onlygecko)\
**Post date:** [August 17, 2026, 11:28am UTC](https://community.bluespice.com/t/nsfilerepo-images-cant-be-viewed-within-media-viewer/438/5 "2026-08-17T11:28:59Z")

</div>

I would love to share the URL, but it’s just internal. How can I send you the HAR file?

---

<div class="post-metadata">

**Author:** ![huaj1ng](https://dub1.discourse-cdn.com/flex017/user_avatar/community.bluespice.com/huaj1ng/32/116_2.png) [@huaj1ng](https://community.bluespice.com/u/huaj1ng)\
**Post date:** [August 18, 2026, 7:13am UTC](https://community.bluespice.com/t/nsfilerepo-images-cant-be-viewed-within-media-viewer/438/6 "2026-08-18T07:13:38Z")

</div>

Hello onlygecko,

from the error message “file does not exist: Datei:Pimcore-Logo.svg”, the error seems to happen in `mmv.provider.ImageInfo.js` - it is constructing a wrong `file.getPrefixedDb()`, which should be `Datei:PIMCORE:Pimcore-Logo.svg`. For further understanding the problem, you can:

- Compare `git diff` in the MultimediaViewer directory with the message of rvogel, confirming whether all adjustments are there
- Check the behavior of your wiki in the browser, and compare with the well working example below
- If there is any information to share, but not suitable to publish on a public forum, `support@hallowelt.com` can be the email address to use

One more thing that worth noticing: in [Reference:NSFileRepo - BlueSpice Helpdesk](https://en.wiki.bluespice.com/wiki/Reference:NSFileRepo#Configuration) there are several config variables listed, where `$egNSFileRepoNamespaceBlacklist` by default exclude the id 104 you are using for the `PIMCORE` namespace - that used to be [an old id reserved for SMW](https://www.mediawiki.org/wiki/Extension_default_namespaces#ID_100%E2%80%93199). Please remove 104 from the list, so that NSFR works with this namespace as expected.

Hope you get NSFR running well soon = )

* * *

For comparison of behavior, an working example is: [Manual:Extension/PDFCreator/Custom cover sheets - BlueSpice Helpdesk](https://en.wiki.bluespice.com/wiki/Manual:Extension/PDFCreator/Custom_cover_sheets)

This is a page quoting `[[File:Manual:PDFcreator book cover.png|alt=...|center|thumb|566x566px|Custom cover page]]`. Inspecting the link of the displayed thumbnail picture, it is:

```auto
https://en.wiki.bluespice.com/w/nsfr_img_auth.php/thumb/3002/0/09/PDFcreator_book_cover.png/400px-PDFcreator_book_cover.png

```

When clicking into the MultiMedia Viewer view of this picture, the picture is served with its original link:

```auto
https://en.wiki.bluespice.com/w/nsfr_img_auth.php/3002/0/09/PDFcreator_book_cover.png

```

---

<div class="post-metadata">

**Author:** ![onlygecko](https://avatars.discourse-cdn.com/v4/letter/o/49beb7/32.png) [@onlygecko](https://community.bluespice.com/u/onlygecko)\
**Post date:** [August 18, 2026, 1:10pm UTC](https://community.bluespice.com/t/nsfilerepo-images-cant-be-viewed-within-media-viewer/438/7 "2026-08-18T13:10:30Z")

</div>

Hi @huaj1ng ,

thanks for the comprehensive reply!

I’ve removed the 104 namespace from the Blacklist - with no impact.  
`$wgNSFileRepoNamespaceBlacklist=array ( 0 =\> 108, 1 =\> 274, 2 =\> 828, );`

The patch has been applied successfully. I did compare it to [resources/mmv/provider/mmv.provider.ImageInfo.js - mediawiki/extensions/MultimediaViewer - Gitiles](https://gerrit.wikimedia.org/r/plugins/gitiles/mediawiki/extensions/MultimediaViewer/+/refs/heads/REL1_43/resources/mmv/provider/mmv.provider.ImageInfo.js)

You might be right with the guess, that `file.getPrefixedDb()` is the source of the issue.

`file.getPrefixedDb()` returns the following correct file name on the File page when clicking in “Open in Media Viewer”

 ![image](https://europe1.discourse-cdn.com/flex017/uploads/bluespice/original/1X/c95e5e5df20e3ce1a313337adc0fe8f9a6bc38fb.png)

On the “normal” page it returns the false file name when clicking on the image (to open in the Multimedia Viewer):

 ![image](https://europe1.discourse-cdn.com/flex017/uploads/bluespice/original/1X/c95e5e5df20e3ce1a313337adc0fe8f9a6bc38fb.png)

Does the info helps in any way to identify the cause of the issue?

---

<div class="post-metadata">

**Author:** ![huaj1ng](https://dub1.discourse-cdn.com/flex017/user_avatar/community.bluespice.com/huaj1ng/32/116_2.png) [@huaj1ng](https://community.bluespice.com/u/huaj1ng)\
**Post date:** [August 18, 2026, 5:35pm UTC](https://community.bluespice.com/t/nsfilerepo-images-cant-be-viewed-within-media-viewer/438/8 "2026-08-18T17:35:37Z")

</div>

Hello onlygecko,

thanks for the quick feedback! For the configuring line of NSFR: `eg` is used instead of `wg` as the configuration prefix. Actually, after testing, I noticed that the configuration is not trivial to override. Please use these config lines with a little magic instead of your original array line:

```php
$GLOBALS['wgExtensionFunctions'][] = function () {
        $GLOBALS['egNSFileRepoNamespaceBlacklist'] = [108, 274, 828];
};

```

By the way, the two pictures in your previous message look identical to me - should there be one different picture instead?

Greetings,  
Hua

---

<div class="post-metadata">

**Author:** ![onlygecko](https://avatars.discourse-cdn.com/v4/letter/o/49beb7/32.png) [@onlygecko](https://community.bluespice.com/u/onlygecko)\
**Post date:** [August 19, 2026, 9:49am UTC](https://community.bluespice.com/t/nsfilerepo-images-cant-be-viewed-within-media-viewer/438/9 "2026-08-19T09:49:20Z")

</div>

Hello Hua,

using your config snippet did not work. But thanks for sticking with it (and me). That’s much appreciated!

You are absolutly right, I did post the same screenshot twice. So once again:

1.) A click on “Open in Multimedia Viewer” on File page

 ![image](https://europe1.discourse-cdn.com/flex017/uploads/bluespice/original/1X/4d1b1a909dc46000eec29f9274c53ee66b478486.png)

2.) A click on image on regular page.

 ![image](https://europe1.discourse-cdn.com/flex017/uploads/bluespice/original/1X/fbf4f9bddeebe5fdc8cee86e3d8fecba4ad03bd9.png)

As You said, `file.getPrefixedDb()\ might be worth having a look at. Do you have a suggestion where specificly I should look?

I would like add two things - which might not play a role but maybe they do…:

- We run Mediawiki within a container behind a Apache Webserver. The Apache forwards the requests to the Mediawiki container.
- I put a _copy_ of `nsfr_img_auth.php` to the Mediawiki root directory and set `$wgUploadPath = "/nsfr_img_auth.php";` Just reading the extension docu again I did not find any info that this needs to be done. Before the introduction of “NSFileRepo” the paramter was set to `$wgUploadPath = "/img_auth.php";` Resetting it back to `/img_auth.php` did not change the behavior.
