diff --git a/src/Services/FormatterBuilder.php b/src/Services/FormatterBuilder.php index 3e7ba88..48688ff 100644 --- a/src/Services/FormatterBuilder.php +++ b/src/Services/FormatterBuilder.php @@ -4,6 +4,7 @@ namespace Wikibase\LocalMedia\Services; +use ParserOptions; use RequestContext; use ValueFormatters\FormatterOptions; use ValueFormatters\ValueFormatter; @@ -27,7 +28,7 @@ public function newFormatter( string $format, FormatterOptions $options ): Value if ( $snakFormat->isPossibleFormat( SnakFormatter::FORMAT_HTML_VERBOSE, $format ) ) { return new InlineImageFormatter( - RequestContext::getMain()->getOutput()->parserOptions(), + ParserOptions::newFromContext( RequestContext::getMain() ), $this->thumbLimits, $options->getOption( ValueFormatter::OPT_LANG ), new LocalImageLinker(),