diff --git a/infogram.install b/infogram.install
index 0395df2..6587d5e 100644
--- a/infogram.install
+++ b/infogram.install
@@ -15,7 +15,7 @@ use Drupal\Core\File\Exception\FileException;
  */
 function infogram_update_8001() {
 
-  $source = drupal_get_path('module', 'infogram') . '/images/icons';
+  $source = \Drupal::service('extension.list.module')->getPath('infogram') . '/images/icons';
   $destination = \Drupal::config('media.settings')->get('icon_base_uri');
   /** @var \Drupal\Core\File\FileSystemInterface $file_system */
   $file_system = \Drupal::service('file_system');
diff --git a/src/Infogram.php b/src/Infogram.php
index d4ca32b..827b867 100644
--- a/src/Infogram.php
+++ b/src/Infogram.php
@@ -18,7 +18,7 @@ class Infogram {
    * Constructs the Infogram service class.
    */
   public function __construct() {
-    $this->templatePath = drupal_get_path('module', 'infogram') . '/templates/infogram.html.twig';
+    $this->templatePath = \Drupal::service('extension.list.module')->getPath('infogram') . '/templates/infogram.html.twig';
   }
 
   /**
