diff --git a/src/Directive/FigureDirective.php b/src/Directive/FigureDirective.php
new file mode 100644
index 0000000..43cfdd2
--- /dev/null
+++ b/src/Directive/FigureDirective.php
@@ -0,0 +1,64 @@
+
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace SymfonyDocsBuilder\Directive;
+
+use Doctrine\RST\Directives\SubDirective;
+use Doctrine\RST\Nodes\Node;
+use Doctrine\RST\Parser;
+
+/**
+ * Overridden to handle "figclass" properly.
+ */
+class FigureDirective extends SubDirective
+{
+ public function getName(): string
+ {
+ return 'figure';
+ }
+
+ /**
+ * @param string[] $options
+ */
+ public function processSub(
+ Parser $parser,
+ ?Node $document,
+ string $variable,
+ string $data,
+ array $options
+ ): ?Node {
+ $environment = $parser->getEnvironment();
+
+ $url = $environment->relativeUrl($data);
+
+ if ($url === null) {
+ throw new \Exception(sprintf('Could not get relative url for %s', $data));
+ }
+
+ $nodeFactory = $parser->getNodeFactory();
+
+ /* Start Custom Code */
+ $figClass = $options['figclass'] ?? null;
+ unset($options['figclass']);
+ /* End Custom Code */
+
+ $figureNode = $parser->getNodeFactory()->createFigureNode(
+ $nodeFactory->createImageNode($url, $options),
+ $document
+ );
+
+ /* Start Custom Code */
+ if ($figClass) {
+ $figureNode->setClasses(explode(' ', $figClass));
+ }
+ /* End Custom Code */
+
+ return $figureNode;
+ }
+}
diff --git a/src/KernelFactory.php b/src/KernelFactory.php
index 3a17b47..f886634 100644
--- a/src/KernelFactory.php
+++ b/src/KernelFactory.php
@@ -80,6 +80,7 @@ private static function getDirectives(): array
new SymfonyDirectives\DangerDirective(),
new SymfonyDirectives\DeprecatedDirective(),
new SymfonyDirectives\ErrorDirective(),
+ new SymfonyDirectives\FigureDirective(),
new SymfonyDirectives\HintDirective(),
new SymfonyDirectives\ImportantDirective(),
new SymfonyDirectives\IndexDirective(),
diff --git a/src/Templates/default/html/figure.html.twig b/src/Templates/default/html/figure.html.twig
new file mode 100644
index 0000000..e1786c0
--- /dev/null
+++ b/src/Templates/default/html/figure.html.twig
@@ -0,0 +1,20 @@
+{#
+Overridden to fix lack of figclass support (class attribute on
And RST figures use a different syntax to define their custom CSS classes:
+ +