diff --git a/core/modules/image/src/Entity/ImageStyle.php b/core/modules/image/src/Entity/ImageStyle.php
index 4506891..df134ab 100644
--- a/core/modules/image/src/Entity/ImageStyle.php
+++ b/core/modules/image/src/Entity/ImageStyle.php
@@ -307,6 +307,15 @@ public function transformDimensions(array &$dimensions) {
   /**
    * {@inheritdoc}
    */
+  public function transformMimeType(&$mime_type) {
+    foreach ($this->getEffects() as $effect) {
+      $effect->transformMimeType($mime_type);
+    }
+  }
+
+  /**
+   * {@inheritdoc}
+   */
   public function getPathToken($uri) {
     // Return the first 8 characters.
     return substr(Crypt::hmacBase64($this->id() . ':' . $uri, \Drupal::service('private_key')->get() . Settings::getHashSalt()), 0, 8);
@@ -333,7 +342,7 @@ public function getEffect($effect) {
    */
   public function getEffects() {
     if (!$this->effectsBag) {
-      $this->effectsBag = new ImageEffectBag(\Drupal::service('plugin.manager.image.effect'), $this->effects);
+      $this->effectsBag = new ImageEffectBag($this->getImageEffectPluginManager(), $this->effects);
       $this->effectsBag->sort();
     }
     return $this->effectsBag;
@@ -377,4 +386,11 @@ public function setName($name) {
     return $this;
   }
 
+  /**
+   * {@inheritdoc}
+   */
+  public function getImageEffectPluginManager() {
+    return \Drupal::service('plugin.manager.image.effect');
+  }
+
 }
diff --git a/core/modules/image/src/ImageEffectBase.php b/core/modules/image/src/ImageEffectBase.php
index 6714dd8..329f332 100644
--- a/core/modules/image/src/ImageEffectBase.php
+++ b/core/modules/image/src/ImageEffectBase.php
@@ -77,6 +77,12 @@ public function transformDimensions(array &$dimensions) {
   /**
    * {@inheritdoc}
    */
+  public function transformMimeType(&$mime_type) {
+  }
+
+  /**
+   * {@inheritdoc}
+   */
   public function getSummary() {
     return array(
       '#markup' => '',
diff --git a/core/modules/image/src/ImageEffectInterface.php b/core/modules/image/src/ImageEffectInterface.php
index b0ea2ea..36b789b 100644
--- a/core/modules/image/src/ImageEffectInterface.php
+++ b/core/modules/image/src/ImageEffectInterface.php
@@ -44,6 +44,14 @@ public function applyEffect(ImageInterface $image);
   public function transformDimensions(array &$dimensions);
 
   /**
+   * Determines the MIME type of the image effect.
+   *
+   * @param string $mime_type
+   *   The MIME type to be modified.
+   */
+  public function transformMimeType(&$mime_type);
+
+  /**
    * Returns a render array summarizing the configuration of the image effect.
    *
    * @return array
diff --git a/core/modules/image/src/ImageStyleInterface.php b/core/modules/image/src/ImageStyleInterface.php
index fa14faf..820e7d7 100644
--- a/core/modules/image/src/ImageStyleInterface.php
+++ b/core/modules/image/src/ImageStyleInterface.php
@@ -131,6 +131,14 @@ public function createDerivative($original_uri, $derivative_uri);
   public function transformDimensions(array &$dimensions);
 
   /**
+   * Determines the MIME type of the image style.
+   *
+   * @param string $mime_type
+   *   The MIME type to be modified.
+   */
+  public function transformMimeType(&$mime_type);
+
+  /**
    * Returns a specific image effect.
    *
    * @param string $effect
@@ -170,4 +178,12 @@ public function addImageEffect(array $configuration);
    */
   public function deleteImageEffect(ImageEffectInterface $effect);
 
+  /**
+   * Returns the image effect plugin manager.
+   *
+   * @return \Drupal\Component\Plugin\PluginManagerInterface
+   *   The image effect plugin manager.
+   */
+  public function getImageEffectPluginManager();
+
 }
diff --git a/core/modules/image/src/Tests/ImageStyleTest.php b/core/modules/image/src/Tests/ImageStyleTest.php
new file mode 100644
index 0000000..78d9b7c
--- /dev/null
+++ b/core/modules/image/src/Tests/ImageStyleTest.php
@@ -0,0 +1,111 @@
+<?php
+
+/**
+ * @file
+ * Contains \Drupal\image\Tests\ImageStyleTest.
+ */
+
+namespace Drupal\image\Tests;
+
+use Drupal\Tests\UnitTestCase;
+
+/**
+ * @coversDefaultClass \Drupal\image\Entity\ImageStyle
+ *
+ * @group Drupal
+ * @group Image
+ */
+class ImageStyleTest extends UnitTestCase {
+
+  /**
+   * The entity type used for testing.
+   *
+   * @var \Drupal\Core\Entity\EntityTypeInterface|\PHPUnit_Framework_MockObject_MockObject
+   */
+  protected $entityType;
+
+  /**
+   * The entity manager used for testing.
+   *
+   * @var \Drupal\Core\Entity\EntityManagerInterface|\PHPUnit_Framework_MockObject_MockObject
+   */
+  protected $entityManager;
+
+  /**
+   * The ID of the type of the entity under test.
+   *
+   * @var string
+   */
+  protected $entityTypeId;
+
+  /**
+   * The effect manager used for testing.
+   *
+   * @var \Drupal\image\ImageEffectManager|\PHPUnit_Framework_MockObject_MockObject
+   */
+  protected $effectManager;
+
+  /**
+   * The image effect used for testing.
+   *
+   * @var \Drupal\image\ImageEffectInterface|\PHPUnit_Framework_MockObject_MockObject
+   */
+  protected $imageEffect;
+
+  /**
+   * {@inheritdoc}
+   */
+  public function setUp() {
+    $this->entityTypeId = $this->randomMachineName();
+    $this->provider = $this->randomMachineName();
+    $this->entityType = $this->getMock('\Drupal\Core\Entity\EntityTypeInterface');
+    $this->entityType->expects($this->any())
+      ->method('getProvider')
+      ->will($this->returnValue($this->provider));
+    $this->entityManager = $this->getMock('\Drupal\Core\Entity\EntityManagerInterface');
+    $this->entityManager->expects($this->any())
+      ->method('getDefinition')
+      ->with($this->entityTypeId)
+      ->will($this->returnValue($this->entityType));
+    $this->effectManager = $this->getMockBuilder('\Drupal\image\ImageEffectManager')
+      ->disableOriginalConstructor()
+      ->getMock();
+  }
+
+  /**
+   * @covers ::transformMimeType
+   */
+  public function testTransformMimeType() {
+    $image_effect_id = $this->randomMachineName();
+    $logger = $this->getMockBuilder('\Psr\Log\LoggerInterface')->getMock();
+    $image_effect = $this->getMockBuilder('\Drupal\image\ImageEffectBase')
+      ->setConstructorArgs(array(array(), $image_effect_id, array(), $logger))
+      ->getMock();
+    $image_effect->expects($this->any())
+      ->method('transformMimeType')
+      ->will($this->returnCallback(function (&$mime_type) { $mime_type = 'image/webp';}));
+
+    $this->effectManager->expects($this->any())
+      ->method('createInstance')
+      ->with($image_effect_id)
+      ->will($this->returnValue($image_effect));
+
+    $image_style = $this->getMockBuilder('\Drupal\image\Entity\ImageStyle')
+      ->setConstructorArgs(array(
+        array('effects' => array($image_effect_id => array('id' => $image_effect_id))),
+        $this->entityTypeId,
+      ))
+      ->setMethods(array('getImageEffectPluginManager'))
+      ->getMock();
+    $image_style->expects($this->any())
+      ->method('getImageEffectPluginManager')
+      ->will($this->returnValue($this->effectManager));
+
+    $mime_types = array('image/jpeg', 'image/gif', 'image/png');
+    foreach ($mime_types as $mime_type) {
+      $image_style->transformMimeType($mime_type);
+      $this->assertEquals($mime_type, 'image/webp');
+    }
+  }
+
+}
