From e262cacfec5d122383b655100807349e744d8520 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Rapha=C3=ABl=20Gertz?= Date: Mon, 13 Oct 2025 15:29:36 +0200 Subject: [PATCH] Add formats array and default thumb format --- DependencyInjection/Configuration.php | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/DependencyInjection/Configuration.php b/DependencyInjection/Configuration.php index 2f29209..be4bb2a 100644 --- a/DependencyInjection/Configuration.php +++ b/DependencyInjection/Configuration.php @@ -110,6 +110,16 @@ class Configuration implements ConfigurationInterface { 'lemon' => dirname(__DIR__).'/public/woff2/lemon.woff2', 'notoemoji' => dirname(__DIR__).'/public/woff2/notoemoji.woff2' ], + 'formats' => [ + 'ico', + 'jpeg', + 'jpg', + 'png', + 'svg', + 'tiff', + 'webm', + 'webp', + ], 'map' => [ 'border' => '#00c3f9', 'fill' => '#cff', @@ -166,6 +176,7 @@ class Configuration implements ConfigurationInterface { 'transport' => 'http://a.tile.thunderforest.com/transport/{Z}/{X}/{Y}.png' ], 'thumb' => [ + 'format' => 'jpeg', 'height' => 128, 'width' => 128 ], @@ -310,6 +321,11 @@ class Configuration implements ConfigurationInterface { ->defaultValue($defaults['fonts']) ->scalarPrototype()->end() ->end() + ->arrayNode('formats') + ->treatNullLike([]) + ->defaultValue($defaults['formats']) + ->scalarPrototype()->end() + ->end() ->arrayNode('map') ->addDefaultsIfNotSet() ->children() @@ -371,6 +387,7 @@ class Configuration implements ConfigurationInterface { ->addDefaultsIfNotSet() ->children() ->scalarNode('height')->cannotBeEmpty()->defaultValue($defaults['thumb']['height'])->end() + ->scalarNode('format')->cannotBeEmpty()->defaultValue($defaults['thumb']['format'])->end() ->scalarNode('width')->cannotBeEmpty()->defaultValue($defaults['thumb']['width'])->end() ->end() ->end() -- 2.41.3