Problem viewing images previously viewed. Osimis? PostGreSQL?

I have a Docker build of Orthanc based on the osimis/orthanc-webviewer-plugin:latest (circa 6 months ago) where I make use of both the PostGre and Osimis viewer plugins. I have the PostGre set up to store the DICOM as blobs in the database.

I have some users reporting that they cannot view images in the Osimis viewer that they’re pretty confident they viewed before. I can confirm that I cannot view the images, though when I try, I’m trying for the first time, myself.

In some cases, within a study, the scout series (the first series) might be viewable, but the remaining series fail to load. Digging into the javascript developer console, I see a lot of errors regarding empty objects, uncaught exceptions, unhandled rejection of binary requests… really a lot of javascript errors, so I couldn’t guess what is the primary error and what is simply a cascade from that.

The same images can be viewed using the standard web viewer plugin that ships with the Orthanc docker image. I simply swap out the Orthanc image, leaving the postgres container up and running. The Orthanc web viewer can view images where the Osimis cannot.

What might be going on here?

  • Is the standard Orthanc webviewer capable of handling some compression schemes that the Osimis viewer is not?

  • I downloaded DICOM and dug into them with command line DCMTK tools to see if the compression schemes are different between working and non-working images, but I couldn’t see anything. I might not be looking in the right place and I’m not convinced the act of downloading from Orthanc itself doesn’t repackage into a single compression scheme.

  • The fact that the users report earlier success with Osimis followed by later failure makes me think it’s not a compression scheme problem.- Does the Osimis viewer and/or PostGres store extracted image blobs (separate from the DICOM blobs), sort of like a cache of extracted JPEG to return rather than re-extracting images each time from original DICOM?

  • I could imagine such a cache becoming corrupted for some reason (our servers sometimes crash for other reasons not related to Orthanc)

  • Is there a way to erase such a cache and force re-extraction of images from the original DICOM?

  • Do I simply delete the WebViewerCache on disk and restart? Why wouldn’t the same problem occur for the Orthanc standard web viewer if they’re both using the same disk cache?

  • I tried downloading a few of the more recent osimis/orthanc-webviewer-plugin docker containers (release-1.1.0, trenser, etc.)

  • As far as I could tell, they were missing the PostGreSQL plugin for Orthanc. Hence, they don’t work as a base image for me with my postgres setup.

  • Even though the dockerfile described on Docker hub indicates they are starting with the standard jodogne/orthanc-plugins which should come with the postgresql plugin.

Thanks for suggestions,

As a followup, I’ve tried multiple browsers as well as browsers running inside and outside of the Proxy I have in front of Orthanc. I see the same problem in all cases, which leads me to believe it’s not a browser javascript support issue or a proxy problem.


As an experiment, I downloaded a problematic study from one Orthanc and uploaded it (via DCMTK command line storescu) to a different Orthanc.

The Osimis viewer on the 2nd Orthanc has no problem viewing the study.

This makes me think that there’s some sort of corruption going on of either an image cache in Postgres or the postgres data blobs themselves.


Downloading the archive from the problematic Orthanc, deleting the subject from Orthanc, and re-uploading fixed the viewing problem for that subject.

So, the images seem to be intact in the database. There’s something corrupted in the viewing process that is only cleared out by deleting the subject and reloading the images via storescu.

I’d prefer not to have to go through that process for every problematic subject.


Hi John,

Indeed, this looks like a cache corruption but this might depend on the version you’re using. It’s quite hard to tell what’s going on since there has been many changes in the last 6 months and the fact that you use the “latest” tag does not give information about the exact version you’re using (tip: always pin the version number you’re using so your setups are reproducible).

By the way, the osimis/orthanc-webviewer-plugin is not the recommended image to use anymore, you should use osimis/orthanc instead ( This image contains all open-source plugin including PG and the Osimis WebViewer. You’ll find instructions on how to use this image here: and sample setups here: