diff --git a/src/Mail/HtmlComposer.php b/src/Mail/HtmlComposer.php
index 3554d7c..0129eb9 100644
--- a/src/Mail/HtmlComposer.php
+++ b/src/Mail/HtmlComposer.php
@@ -8,8 +8,10 @@
namespace Nette\Mail;
use Nette;
+use Nette\Utils\FileSystem;
use Nette\Utils\Strings;
-use function array_map, array_reverse, explode, implode, is_string, rtrim, strlen, substr, substr_replace, trim, urldecode;
+use function array_key_exists, array_map, array_reverse, explode, finfo_file, finfo_open, implode, is_file, is_string, rtrim, str_starts_with, strlen, substr, substr_replace, trim, urldecode;
+use const DIRECTORY_SEPARATOR, FILEINFO_MIME_TYPE;
/**
@@ -31,7 +33,9 @@ public function __construct(
/**
* Enables embedding of local images referenced in HTML. The path is the base directory
* for resolving relative image references in ,