public function processSub(Parser $parser, $document, $variable, $data, array $options) { $environment = $parser->getEnvironment(); $url = $environment->relativeUrl($data); return new FigureNode(new ImageNode($url, $options), $document); }