diff --git a/src/Controller/ChooseSectionFromLibraryController.php b/src/Controller/ChooseSectionFromLibraryController.php
index b251f36..728f240 100644
--- a/src/Controller/ChooseSectionFromLibraryController.php
+++ b/src/Controller/ChooseSectionFromLibraryController.php
@@ -120,7 +120,7 @@ class ChooseSectionFromLibraryController implements ContainerInjectionInterface
         $img_path = $file->getFileUri();
       }
 
-      $icon_url = file_url_transform_relative(file_create_url($img_path));
+      $icon_url = \Drupal::service('file_url_generator')->generateString($img_path);
       $link = [
         'title' => Markup::create('<img src="' . $icon_url . '" class="section-library-link-img" /> ' . '<span class="section-library-link-label">' . $section->label() . '</span>'),
         'url' => Url::fromRoute('section_library.import_section_from_library',
