diff --git a/src/Plugin/Field/FieldFormatter/ImagefieldSlideshowFieldFormatter.php b/src/Plugin/Field/FieldFormatter/ImagefieldSlideshowFieldFormatter.php
index f658060..c20e8dd 100644
--- a/src/Plugin/Field/FieldFormatter/ImagefieldSlideshowFieldFormatter.php
+++ b/src/Plugin/Field/FieldFormatter/ImagefieldSlideshowFieldFormatter.php
@@ -2,14 +2,16 @@
 
 namespace Drupal\imagefield_slideshow\Plugin\Field\FieldFormatter;
 
-use Drupal\Component\Utility\Html;
-use Drupal\Core\Cache\Cache;
-use Drupal\Core\Field\FieldItemInterface;
+use Drupal\Core\Entity\EntityStorageInterface;
+use Drupal\Core\Field\FieldDefinitionInterface;
 use Drupal\Core\Field\FieldItemListInterface;
 use Drupal\Core\Form\FormStateInterface;
+use Drupal\Core\Link;
+use Drupal\Core\Plugin\ContainerFactoryPluginInterface;
+use Drupal\Core\Session\AccountInterface;
 use Drupal\Core\Url;
-use Drupal\image\Entity\ImageStyle;
 use Drupal\image\Plugin\Field\FieldFormatter\ImageFormatterBase;
+use Symfony\Component\DependencyInjection\ContainerInterface;
 
 /**
  * Plugin implementation of the 'imagefield_slideshow_field_formatter' formatter.
@@ -22,7 +24,64 @@ use Drupal\image\Plugin\Field\FieldFormatter\ImageFormatterBase;
  *   }
  * )
  */
-class ImagefieldSlideshowFieldFormatter extends ImageFormatterBase {
+class ImagefieldSlideshowFieldFormatter extends ImageFormatterBase implements ContainerFactoryPluginInterface {
+
+  /**
+   * The current user.
+   *
+   * @var \Drupal\Core\Session\AccountInterface
+   */
+  protected $currentUser;
+
+  /**
+   * The image style entity storage.
+   *
+   * @var \Drupal\image\ImageStyleStorageInterface
+   */
+  protected $imageStyleStorage;
+
+  /**
+   * Constructs an ImageFormatter object.
+   *
+   * @param string $plugin_id
+   *   The plugin_id for the formatter.
+   * @param mixed $plugin_definition
+   *   The plugin implementation definition.
+   * @param \Drupal\Core\Field\FieldDefinitionInterface $field_definition
+   *   The definition of the field to which the formatter is associated.
+   * @param array $settings
+   *   The formatter settings.
+   * @param string $label
+   *   The formatter label display setting.
+   * @param string $view_mode
+   *   The view mode.
+   * @param array $third_party_settings
+   *   Any third party settings settings.
+   * @param \Drupal\Core\Session\AccountInterface $current_user
+   *   The current user.
+   */
+  public function __construct($plugin_id, $plugin_definition, FieldDefinitionInterface $field_definition, array $settings, $label, $view_mode, array $third_party_settings, AccountInterface $current_user, EntityStorageInterface $image_style_storage) {
+    parent::__construct($plugin_id, $plugin_definition, $field_definition, $settings, $label, $view_mode, $third_party_settings);
+    $this->currentUser = $current_user;
+    $this->imageStyleStorage = $image_style_storage;
+  }
+
+  /**
+   * {@inheritdoc}
+   */
+  public static function create(ContainerInterface $container, array $configuration, $plugin_id, $plugin_definition) {
+    return new static(
+      $plugin_id,
+      $plugin_definition,
+      $configuration['field_definition'],
+      $configuration['settings'],
+      $configuration['label'],
+      $configuration['view_mode'],
+      $configuration['third_party_settings'],
+      $container->get('current_user'),
+      $container->get('entity.manager')->getStorage('image_style')
+    );
+  }
 
   /**
    * {@inheritdoc}
@@ -30,6 +89,7 @@ class ImagefieldSlideshowFieldFormatter extends ImageFormatterBase {
   public static function defaultSettings() {
     return array(
       // Implement default settings.
+      'imagefield_slideshow_style' => '',
     ) + parent::defaultSettings();
   }
 
@@ -37,9 +97,22 @@ class ImagefieldSlideshowFieldFormatter extends ImageFormatterBase {
    * {@inheritdoc}
    */
   public function settingsForm(array $form, FormStateInterface $form_state) {
-    return array(
-      // Implement settings form.
-    ) + parent::settingsForm($form, $form_state);
+    $image_styles = image_style_options(FALSE);
+    $description_link = Link::fromTextAndUrl(
+      $this->t('Configure Image Styles'),
+      Url::fromRoute('entity.image_style.collection')
+    );
+    $element['imagefield_slideshow_style'] = [
+      '#title' => t('Image style'),
+      '#type' => 'select',
+      '#default_value' => $this->getSetting('imagefield_slideshow_style'),
+      '#empty_option' => t('None (original image)'),
+      '#options' => $image_styles,
+      '#description' => $description_link->toRenderable() + [
+        '#access' => $this->currentUser->hasPermission('administer image styles')
+      ],
+    ];
+    return $element;
   }
 
   /**
@@ -48,6 +121,18 @@ class ImagefieldSlideshowFieldFormatter extends ImageFormatterBase {
   public function settingsSummary() {
     $summary = [];
     // Implement settings summary.
+    $image_styles = image_style_options(FALSE);
+    // Unset possible 'No defined styles' option.
+    unset($image_styles['']);
+    // Styles could be lost because of enabled/disabled modules that defines
+    // their styles in code.
+    $image_style_setting = $this->getSetting('imagefield_slideshow_style');
+    if (isset($image_styles[$image_style_setting])) {
+      $summary[] = t('Image style: @style', array('@style' => $image_styles[$image_style_setting]));
+    }
+    else {
+      $summary[] = t('Original image');
+    }
 
     return $summary;
   }
@@ -67,7 +152,7 @@ class ImagefieldSlideshowFieldFormatter extends ImageFormatterBase {
     $image_uri_values = [];
     foreach ($files as $delta => $file) {
       $uri = $file->getFileUri();
-      $image_uri_value = ImageStyle::load('medium')->buildUrl($uri);
+      $image_uri_value = $this->imageStyleStorage->load('medium')->buildUrl($uri);
       $image_uri_values[] = $image_uri_value;
     }
 
@@ -76,27 +161,7 @@ class ImagefieldSlideshowFieldFormatter extends ImageFormatterBase {
       '#url' => $image_uri_values,
     );
 
-    /*foreach ($items as $delta => $item) {
-      $elements[$delta] = ['#markup' => $this->viewValue($item)];
-    }*/
-
     return $elements;
   }
 
-  /**
-   * Generate the output appropriate for one field item.
-   *
-   * @param \Drupal\Core\Field\FieldItemInterface $item
-   *   One field item.
-   *
-   * @return string
-   *   The textual output generated.
-   */
-  protected function viewValue(FieldItemInterface $item) {
-    // The text value has no text format assigned to it, so the user input
-    // should equal the output, including newlines.
-    // $item->value = 'kkkkkkkkk';
-    return nl2br(Html::escape($item->value));
-  }
-
 }
diff --git a/templates/imagefield-slideshow.html.twig b/templates/imagefield-slideshow.html.twig
index ad11a6c..132ac54 100644
--- a/templates/imagefield-slideshow.html.twig
+++ b/templates/imagefield-slideshow.html.twig
@@ -15,6 +15,6 @@
 #}
 <div class="slideshow">
     {% for key,value in url %}
-        <img src="{{ value }}" width="200" height="200" />
+        <img src="{{ value }}" />
     {% endfor %}
-</div>
\ No newline at end of file
+</div>
