]> git.agnieray.net Git - galette.git/commitdiff
Use base64 image rather than URL for logo replacement
authorJohan Cwiklinski <johan@x-tnd.be>
Thu, 19 Oct 2023 18:33:01 +0000 (20:33 +0200)
committerJohan Cwiklinski <johan@x-tnd.be>
Thu, 19 Oct 2023 18:33:01 +0000 (20:33 +0200)
fixes #1726

galette/lib/Galette/Features/Replacements.php

index 63fee5b82b3ff020d00a92579d79be21dcaaf266..767c52cdf7c268e20de1c3b45e502d673e16adac 100644 (file)
@@ -483,11 +483,13 @@ trait Replacements
         }
 
         $logo = new Logo();
-        $logo_elt = '<img' .
-            ' src="' . $this->preferences->getURL() . $this->routeparser->urlFor('logo') . '"' .
-            ' width="' . $logo->getOptimalWidth() . '"' .
-            ' height="' . $logo->getOptimalHeight() . '"' .
-            '/>';
+
+        $logo_elt = sprintf(
+            '<img src="%1$s" width="%2$s" height="%3$s" />',
+            '@' . base64_encode(file_get_contents($logo->getPath())),
+            $logo->getOptimalWidth(),
+            $logo->getOptimalHeight()
+        );
 
         $this->setReplacements(
             array(