diff --git a/cloudinary.module b/cloudinary.module
index 7788a6a..df8cb16 100644
--- a/cloudinary.module
+++ b/cloudinary.module
@@ -111,7 +111,7 @@ function cloudinary_preprocess_image_style_preview(&$variables) {
   $preview = CLOUDINARY_PREVIEW_IMAGE_PREFIX . $transformation_string . 'sample.jpg';
 
   $variables['derivative']['rendered']['#uri'] = $preview;
-  $variables['derivative']['url'] = file_create_url($preview);
+  $variables['derivative']['url'] = \Drupal::service('file_url_generator')->generateAbsoluteString($preview);
 
   // Sample image info.
   $sample_width = 160;
@@ -119,7 +119,7 @@ function cloudinary_preprocess_image_style_preview(&$variables) {
 
   // Set up original file information.
   $variables['original'] = [
-    'url' => file_create_url($original),
+    'url' => \Drupal::service('file_url_generator')->generateAbsoluteString($original),
     'width' => 864,
     'height' => 576,
   ];
@@ -134,7 +134,7 @@ function cloudinary_preprocess_image_style_preview(&$variables) {
 
   // Set up derivative file information.
   $variables['derivative'] = [
-    'url' => file_create_url($preview),
+    'url' => \Drupal::service('file_url_generator')->generateAbsoluteString($preview),
     'width' => $derivative_width,
     'height' => $derivative_height,
   ];
@@ -180,7 +180,7 @@ function cloudinary_preprocess_image_style_preview(&$variables) {
  * Implements hook_cloudinary_stream_wrapper_transformation().
  */
 function cloudinary_cloudinary_stream_wrapper_transformation() {
-  $path = drupal_get_path('module', 'cloudinary');
+  $path = \Drupal::service('extension.list.module')->getPath('cloudinary');
 
   return [
     'cloudinary_crop' => [
diff --git a/modules/cloudinary_sdk/cloudinary_sdk.module b/modules/cloudinary_sdk/cloudinary_sdk.module
index 71e538b..7f5201d 100644
--- a/modules/cloudinary_sdk/cloudinary_sdk.module
+++ b/modules/cloudinary_sdk/cloudinary_sdk.module
@@ -78,7 +78,7 @@ function cloudinary_sdk_help($route_name) {
 
   $logo = [
     '#theme' => 'image',
-    '#uri' => drupal_get_path('module', 'cloudinary_sdk') . '/images/logo.png',
+    '#uri' => \Drupal::service('extension.list.module')->getPath('cloudinary_sdk') . '/images/logo.png',
     '#alt' => 'Cloudinary Logo',
     '#width' => '344',
     '#height' => '76',
@@ -87,7 +87,7 @@ function cloudinary_sdk_help($route_name) {
 
   $api = [
     '#theme' => 'image',
-    '#uri' => drupal_get_path('module', 'cloudinary_sdk') . '/images/api.png',
+    '#uri' => \Drupal::service('extension.list.module')->getPath('cloudinary_sdk') . '/images/api.png',
     '#alt' => 'Cloudinary Logo',
     '#width' => '600',
     '#height' => '249',
diff --git a/modules/cloudinary_stream_wrapper/cloudinary_stream_wrapper.api.php b/modules/cloudinary_stream_wrapper/cloudinary_stream_wrapper.api.php
index 5df8c7a..34629cc 100644
--- a/modules/cloudinary_stream_wrapper/cloudinary_stream_wrapper.api.php
+++ b/modules/cloudinary_stream_wrapper/cloudinary_stream_wrapper.api.php
@@ -140,7 +140,7 @@ function hook_cloudinary_stream_wrapper_resource_delete(array $resource) {
  *   File for load methods from this file.
  */
 function hook_cloudinary_stream_wrapper_transformation() {
-  $path = drupal_get_path('module', 'cloudinary');
+  $path = \Drupal::service('extension.list.module')->getPath('cloudinary');
 
   return array(
     'image_crop' => array(
diff --git a/src/Plugin/ImageEffect/CloudinaryCrop.php b/src/Plugin/ImageEffect/CloudinaryCrop.php
index 8851eeb..605ab95 100644
--- a/src/Plugin/ImageEffect/CloudinaryCrop.php
+++ b/src/Plugin/ImageEffect/CloudinaryCrop.php
@@ -131,7 +131,7 @@ class CloudinaryCrop extends ConfigurableImageEffectBase {
       '#suffix' => '</div>',
       '#type' => 'item',
       '#title' => $this->t('Preview'),
-      '#markup' => render($preview),
+      '#markup' => \Drupal::service('renderer')->render($preview),
     );
 
     $form['cloudinary']['preview']['reset'] = array(
