From MediaWiki.org
Jump to navigation Jump to search

This Extension gives user the ability to view and manipulate with 3D objects in STL file format.

MediaWiki extensions manualManual:Extensions
Crystal Clear action run.svg

Release status:Extension status experimental

DescriptionTemplate:Extension#description Enables the user to view 3D objects in the STL file format on MediaWiki file pages.
Author(s)Template:Extension#username Harri Alasi
MediaWikiTemplate:Extension#mediawiki 1.25+
LicenseTemplate:Extension#license GNU General Public License 3.0

Translate the StlHandler extension if it is available at translatewiki.net

Check usage and version matrix.


Open tasks · Report a bug


  • Download and place the file(s) in a directory called StlHandler in your extensions/ folder.
  • Add the following code at the bottom of your LocalSettings.php:
    wfLoadExtension( 'StlHandler' );
    $wgFileExtensions[] = 'stl'; 
    $wgTrustedMediaFormats[] = "application/sla";
    $wgTrustedMediaFormats[] = "application/octet-stream";
  • Add the following lines

application/sla stl
text/plain stl
application/octet-stream stl

to the beginning of the file mime.types located in the includes/ folder (if there is no mime.types in that folder, try includes/libs/mime folder)

  • (Optional) Configure canvas attributes
  • YesY Done – Navigate to Special:Version on your wiki to verify that the extension is successfully installed.


You can set some variables in the "LocalSettings.php" file to configure the canvas that your model will be displayed onto:

$wgStlCanvasHeight (default = "480")
Assign height value to your canvas
$wgStlCanvasWidth (default = "600")
Assign width value to your canvas
$wgStlBackgroundImage (default = "")
full URL of canvas background image
$wgStlBackgroundColor (default = "lightgrey")
background color of your canvas. Color name, color HEX code and rgb(r,g,b) will all work
(See [1] for correct colour-names)

Known issues[edit]

  1. YesY Done Object rotation not working in Firefox
  2. File page shows object size 0px X 0px
  3. File page reports the file type as possibly harmful
  4. YesY Done Only works with binary STL files. If you see File extension ".stl" does not match the detected MIME type of the file (text/plain), save the STL as binary version.

Ideas about further development[edit]

  1. Short user guide to display next to object canvas on file page (scroll to zoom etc)
  2. Make viewer touch-enabled