diff --git a/core/lib/Drupal/Core/Image/Image.php b/core/lib/Drupal/Core/Image/Image.php
index e4c7876..b39dac3 100644
--- a/core/lib/Drupal/Core/Image/Image.php
+++ b/core/lib/Drupal/Core/Image/Image.php
@@ -195,6 +195,13 @@ public function scaleAndCrop($width, $height) {
   /**
    * {@inheritdoc}
    */
+  public function scaleAndCropWithAnchor($x, $y, $width, $height) {
+    return $this->apply('scale_and_crop', ['x' => $x, 'y' => $y, 'width' => $width, 'height' => $height]);
+  }
+
+  /**
+   * {@inheritdoc}
+   */
   public function scale($width, $height = NULL, $upscale = FALSE) {
     return $this->apply('scale', ['width' => $width, 'height' => $height, 'upscale' => $upscale]);
   }
diff --git a/core/lib/Drupal/Core/Image/ImageInterface.php b/core/lib/Drupal/Core/Image/ImageInterface.php
index 29d092a..529e2d1 100644
--- a/core/lib/Drupal/Core/Image/ImageInterface.php
+++ b/core/lib/Drupal/Core/Image/ImageInterface.php
@@ -170,6 +170,27 @@ public function scale($width, $height = NULL, $upscale = FALSE);
   public function scaleAndCrop($width, $height);
 
   /**
+   * Scales an image to the exact width and height given (with an anchor).
+   *
+   * This function achieves the target aspect ratio by cropping the original
+   * image according to the x and  y offsets.
+   *
+   * The resulting image always has the exact target dimensions.
+   * @param int $x
+   *   The starting x offset at which to start the crop, in pixels.
+   * @param int $y
+   *   The starting y offset at which to start the crop, in pixels.
+   * @param int $width
+   *   The target width, in pixels.
+   * @param int $height
+   *   The target height, in pixels.
+   *
+   * @return bool
+   *   TRUE on success, FALSE on failure.
+   */
+  public function scaleAndCropWithAnchor($x, $y, $width, $height);
+
+  /**
    * Instructs the toolkit to save the image in the format specified by the
    * extension.
    *
diff --git a/core/modules/image/config/schema/image.schema.yml b/core/modules/image/config/schema/image.schema.yml
index 924d454..4fcb6c7 100644
--- a/core/modules/image/config/schema/image.schema.yml
+++ b/core/modules/image/config/schema/image.schema.yml
@@ -76,6 +76,10 @@ image.effect.image_desaturate:
 image.effect.image_scale_and_crop:
   type: image_size
   label: 'Image scale and crop'
+  mapping:
+    anchor:
+      label: 'Anchor'
+      type: string
 
 image.settings:
   type: config_object
diff --git a/core/modules/image/image.module b/core/modules/image/image.module
index 1c00e03..74df530 100644
--- a/core/modules/image/image.module
+++ b/core/modules/image/image.module
@@ -126,6 +126,8 @@ function image_theme() {
       'variables' => [
         'style_name' => NULL,
         'uri' => NULL,
+        'x' => NULL,
+        'y' => NULL,
         'width' => NULL,
         'height' => NULL,
         'alt' => '',
@@ -152,6 +154,9 @@ function image_theme() {
     'image_crop_summary' => [
       'variables' => ['data' => NULL, 'effect' => []],
     ],
+    'image_scale_and_crop_summary' => [
+      'variables' => ['data' => NULL, 'effect' => []],
+    ],
     'image_rotate_summary' => [
       'variables' => ['data' => NULL, 'effect' => []],
     ],
diff --git a/core/modules/image/src/Plugin/ImageEffect/ScaleAndCropImageEffect.php b/core/modules/image/src/Plugin/ImageEffect/ScaleAndCropImageEffect.php
index 57ea0b2..e9569b2 100644
--- a/core/modules/image/src/Plugin/ImageEffect/ScaleAndCropImageEffect.php
+++ b/core/modules/image/src/Plugin/ImageEffect/ScaleAndCropImageEffect.php
@@ -13,17 +13,38 @@
  *   description = @Translation("Scale and crop will maintain the aspect-ratio of the original image, then crop the larger dimension. This is most useful for creating perfectly square thumbnails without stretching the image.")
  * )
  */
-class ScaleAndCropImageEffect extends ResizeImageEffect {
+class ScaleAndCropImageEffect extends CropImageEffect {
 
   /**
    * {@inheritdoc}
    */
   public function applyEffect(ImageInterface $image) {
-    if (!$image->scaleAndCrop($this->configuration['width'], $this->configuration['height'])) {
+    $width = $this->configuration['width'];
+    $height = $this->configuration['height'];
+    $scale = max($width / $image->getWidth(), $height / $image->getHeight());
+
+    list($x, $y) = explode('-', $this->configuration['anchor']);
+    $x = image_filter_keyword($x, $image->getWidth() * $scale, $width);
+    $y = image_filter_keyword($y, $image->getHeight() * $scale, $height);
+
+    if (!$image->scaleAndCropWithAnchor($x, $y, $width, $height)) {
       $this->logger->error('Image scale and crop failed using the %toolkit toolkit on %path (%mimetype, %dimensions)', ['%toolkit' => $image->getToolkitId(), '%path' => $image->getSource(), '%mimetype' => $image->getMimeType(), '%dimensions' => $image->getWidth() . 'x' . $image->getHeight()]);
       return FALSE;
     }
     return TRUE;
   }
 
+  /**
+   * {@inheritdoc}
+   */
+  public function getSummary() {
+    $summary = [
+      '#theme' => 'image_scale_and_crop_summary',
+      '#data' => $this->configuration,
+    ];
+    $summary += parent::getSummary();
+
+    return $summary;
+  }
+
 }
diff --git a/core/modules/image/templates/image-scale-and-crop-summary.html.twig b/core/modules/image/templates/image-scale-and-crop-summary.html.twig
new file mode 100644
index 0000000..b120e3f
--- /dev/null
+++ b/core/modules/image/templates/image-scale-and-crop-summary.html.twig
@@ -0,0 +1,32 @@
+{#
+/**
+ * @file
+ * Default theme implementation for a summary of an image scale and crop effect.
+ *
+ * Available variables:
+ * - data: The current configuration for this resize effect, including:
+ *   - width: The width of the resized image.
+ *   - height: The height of the resized image.
+ *   - anchor: The part of the image that will be retained after cropping.
+ *   - anchor_label: The translated label of the crop anchor.
+ * - effect: The effect information, including:
+ *   - id: The effect identifier.
+ *   - label: The effect name.
+ *   - description: The effect description.
+ *
+ * @ingroup themeable
+ */
+#}
+{% if data.width and data.height -%}
+  {{ data.width }}×{{ data.height }}
+{%- else -%}
+  {% if data.width %}
+    {% trans %}
+      width {{ data.width }}
+    {% endtrans %}
+  {% elseif data.height %}
+    {% trans %}
+      height {{ data.height }}
+    {% endtrans %}
+  {% endif %}
+{%- endif %}
diff --git a/core/modules/image/tests/src/Functional/ImageEffectsTest.php b/core/modules/image/tests/src/Functional/ImageEffectsTest.php
index 3207442..f6b4ab3 100644
--- a/core/modules/image/tests/src/Functional/ImageEffectsTest.php
+++ b/core/modules/image/tests/src/Functional/ImageEffectsTest.php
@@ -111,8 +111,29 @@ public function testScaleAndCropEffect() {
 
     // Check the parameters.
     $calls = $this->imageTestGetAllCalls();
-    $this->assertEqual($calls['scale_and_crop'][0][0], 5, 'Width was computed and passed correctly');
-    $this->assertEqual($calls['scale_and_crop'][0][1], 10, 'Height was computed and passed correctly');
+    $this->assertEqual($calls['scale_and_crop'][0][0], 7.5, 'X was computed and passed correctly');
+    $this->assertEqual($calls['scale_and_crop'][0][1], 0, 'Y was computed and passed correctly');
+    $this->assertEqual($calls['scale_and_crop'][0][2], 5, 'Width was computed and passed correctly');
+    $this->assertEqual($calls['scale_and_crop'][0][3], 10, 'Height was computed and passed correctly');
+  }
+
+  /**
+   * Test the image_scale_and_crop_effect() function with an anchor.
+   */
+  public function testScaleAndCropEffectWithAnchor() {
+    $this->assertImageEffect('image_scale_and_crop', [
+      'anchor' => 'top-1',
+      'width' => 5,
+      'height' => 10,
+    ]);
+    $this->assertToolkitOperationsCalled(['scale_and_crop']);
+
+    // Check the parameters.
+    $calls = $this->imageTestGetAllCalls();
+    $this->assertEqual($calls['scale_and_crop'][0][0], 0, 'X was computed and passed correctly');
+    $this->assertEqual($calls['scale_and_crop'][0][1], 1, 'Y was computed and passed correctly');
+    $this->assertEqual($calls['scale_and_crop'][0][2], 5, 'Width was computed and passed correctly');
+    $this->assertEqual($calls['scale_and_crop'][0][3], 10, 'Height was computed and passed correctly');
   }
 
   /**
diff --git a/core/modules/image/tests/src/Kernel/Migrate/d7/MigrateImageStylesTest.php b/core/modules/image/tests/src/Kernel/Migrate/d7/MigrateImageStylesTest.php
index 534a412..a15d49e 100644
--- a/core/modules/image/tests/src/Kernel/Migrate/d7/MigrateImageStylesTest.php
+++ b/core/modules/image/tests/src/Kernel/Migrate/d7/MigrateImageStylesTest.php
@@ -32,7 +32,7 @@ protected function setUp() {
    * Test the image styles migration.
    */
   public function testImageStylesMigration() {
-    $this->assertEntity('custom_image_style_1', "Custom image style 1", ['image_scale_and_crop', 'image_desaturate'], [['width' => 55, 'height' => 55], []]);
+    $this->assertEntity('custom_image_style_1', "Custom image style 1", ['image_scale_and_crop', 'image_desaturate'], [['width' => 55, 'height' => 55, 'anchor' => 'center-center'], []]);
     $this->assertEntity('custom_image_style_2', "Custom image style 2", ['image_resize', 'image_rotate'], [['width' => 55, 'height' => 100], ['degrees' => 45, 'bgcolor' => '#FFFFFF', 'random' => FALSE]]);
     $this->assertEntity('custom_image_style_3', "Custom image style 3", ['image_scale', 'image_crop'], [['width' => 150, 'height' => NULL, 'upscale' => FALSE], ['width' => 50, 'height' => 50, 'anchor' => 'left-top']]);
   }
diff --git a/core/modules/rest/tests/src/Functional/EntityResource/ImageStyle/ImageStyleResourceTestBase.php b/core/modules/rest/tests/src/Functional/EntityResource/ImageStyle/ImageStyleResourceTestBase.php
index ccd68d9..4e3b417 100644
--- a/core/modules/rest/tests/src/Functional/EntityResource/ImageStyle/ImageStyleResourceTestBase.php
+++ b/core/modules/rest/tests/src/Functional/EntityResource/ImageStyle/ImageStyleResourceTestBase.php
@@ -55,6 +55,7 @@ protected function createEntity() {
     $effect = [
       'id' => 'image_scale_and_crop',
       'data' => [
+        'anchor' => 'center-center',
         'width' => 120,
         'height' => 121,
       ],
@@ -79,6 +80,7 @@ protected function getExpectedNormalizedEntity() {
           'id' => 'image_scale_and_crop',
           'weight' => 0,
           'data' => [
+            'anchor' => 'center-center',
             'width' => 120,
             'height' => 121,
           ],
diff --git a/core/modules/system/src/Plugin/ImageToolkit/Operation/gd/ScaleAndCrop.php b/core/modules/system/src/Plugin/ImageToolkit/Operation/gd/ScaleAndCrop.php
index 510020f..2fcda58 100644
--- a/core/modules/system/src/Plugin/ImageToolkit/Operation/gd/ScaleAndCrop.php
+++ b/core/modules/system/src/Plugin/ImageToolkit/Operation/gd/ScaleAndCrop.php
@@ -38,8 +38,12 @@ protected function validateArguments(array $arguments) {
 
     $scaleFactor = max($arguments['width'] / $actualWidth, $arguments['height'] / $actualHeight);
 
-    $arguments['x'] = (int) round(($actualWidth * $scaleFactor - $arguments['width']) / 2);
-    $arguments['y'] = (int) round(($actualHeight * $scaleFactor - $arguments['height']) / 2);
+    $arguments['x'] = isset($arguments['x']) ?
+      (int) round($arguments['x']) :
+      (int) round(($actualWidth * $scaleFactor - $arguments['width']) / 2);
+    $arguments['y'] = isset($arguments['y']) ?
+      (int) round($arguments['y']) :
+      (int) round(($actualHeight * $scaleFactor - $arguments['height']) / 2);
     $arguments['resize'] = [
       'width' => (int) round($actualWidth * $scaleFactor),
       'height' => (int) round($actualHeight * $scaleFactor),
diff --git a/core/profiles/demo_umami/config/install/image.style.large_21_9.yml b/core/profiles/demo_umami/config/install/image.style.large_21_9.yml
index 7e1c7c2..f2be28f 100644
--- a/core/profiles/demo_umami/config/install/image.style.large_21_9.yml
+++ b/core/profiles/demo_umami/config/install/image.style.large_21_9.yml
@@ -9,5 +9,6 @@ effects:
     id: image_scale_and_crop
     weight: 1
     data:
+      anchor: center-center
       width: 1440
       height: 620
diff --git a/core/profiles/demo_umami/config/install/image.style.large_21_9_2x.yml b/core/profiles/demo_umami/config/install/image.style.large_21_9_2x.yml
index 13d8416..d65f5f5 100644
--- a/core/profiles/demo_umami/config/install/image.style.large_21_9_2x.yml
+++ b/core/profiles/demo_umami/config/install/image.style.large_21_9_2x.yml
@@ -9,5 +9,6 @@ effects:
     id: image_scale_and_crop
     weight: 1
     data:
+      anchor: center-center
       width: 2880
       height: 1240
diff --git a/core/profiles/demo_umami/config/install/image.style.large_3_2_2x.yml b/core/profiles/demo_umami/config/install/image.style.large_3_2_2x.yml
index e469fb6..709d3c3 100644
--- a/core/profiles/demo_umami/config/install/image.style.large_3_2_2x.yml
+++ b/core/profiles/demo_umami/config/install/image.style.large_3_2_2x.yml
@@ -9,5 +9,6 @@ effects:
     id: image_scale_and_crop
     weight: 1
     data:
+      anchor: center-center
       width: 1536
       height: 1024
diff --git a/core/profiles/demo_umami/config/install/image.style.large_3_2_768x512.yml b/core/profiles/demo_umami/config/install/image.style.large_3_2_768x512.yml
index ad8e523..59fbbb5 100644
--- a/core/profiles/demo_umami/config/install/image.style.large_3_2_768x512.yml
+++ b/core/profiles/demo_umami/config/install/image.style.large_3_2_768x512.yml
@@ -9,5 +9,6 @@ effects:
     id: image_scale_and_crop
     weight: 1
     data:
+      anchor: center-center
       width: 768
       height: 512
diff --git a/core/profiles/demo_umami/config/install/image.style.medium_21_9.yml b/core/profiles/demo_umami/config/install/image.style.medium_21_9.yml
index 43ce95a..d6b0d6a 100644
--- a/core/profiles/demo_umami/config/install/image.style.medium_21_9.yml
+++ b/core/profiles/demo_umami/config/install/image.style.medium_21_9.yml
@@ -9,5 +9,6 @@ effects:
     id: image_scale_and_crop
     weight: 1
     data:
+      anchor: center-center
       width: 1024
       height: 440
diff --git a/core/profiles/demo_umami/config/install/image.style.medium_3_2_2x.yml b/core/profiles/demo_umami/config/install/image.style.medium_3_2_2x.yml
index 3a1774f..e617feb 100644
--- a/core/profiles/demo_umami/config/install/image.style.medium_3_2_2x.yml
+++ b/core/profiles/demo_umami/config/install/image.style.medium_3_2_2x.yml
@@ -9,5 +9,6 @@ effects:
     id: image_scale_and_crop
     weight: 1
     data:
+      anchor: center-center
       width: 1200
       height: 800
diff --git a/core/profiles/demo_umami/config/install/image.style.medium_3_2_600x400.yml b/core/profiles/demo_umami/config/install/image.style.medium_3_2_600x400.yml
index f72a09d..8ae09da 100644
--- a/core/profiles/demo_umami/config/install/image.style.medium_3_2_600x400.yml
+++ b/core/profiles/demo_umami/config/install/image.style.medium_3_2_600x400.yml
@@ -9,5 +9,6 @@ effects:
     id: image_scale_and_crop
     weight: 1
     data:
+      anchor: center-center
       width: 600
       height: 400
diff --git a/core/profiles/demo_umami/config/install/image.style.scale_crop_7_3_large.yml b/core/profiles/demo_umami/config/install/image.style.scale_crop_7_3_large.yml
index 5f579be..1488edd 100644
--- a/core/profiles/demo_umami/config/install/image.style.scale_crop_7_3_large.yml
+++ b/core/profiles/demo_umami/config/install/image.style.scale_crop_7_3_large.yml
@@ -9,5 +9,6 @@ effects:
     id: image_scale_and_crop
     weight: 1
     data:
+      anchor: center-center
       width: 1440
       height: 617
diff --git a/core/profiles/demo_umami/config/install/image.style.small_21_9.yml b/core/profiles/demo_umami/config/install/image.style.small_21_9.yml
index 905f23f..54cddab 100644
--- a/core/profiles/demo_umami/config/install/image.style.small_21_9.yml
+++ b/core/profiles/demo_umami/config/install/image.style.small_21_9.yml
@@ -9,5 +9,6 @@ effects:
     id: image_scale_and_crop
     weight: 1
     data:
+      anchor: center-center
       width: 768
       height: 330
diff --git a/core/profiles/demo_umami/config/install/image.style.square_large.yml b/core/profiles/demo_umami/config/install/image.style.square_large.yml
index 1bea9a5..55081c3 100644
--- a/core/profiles/demo_umami/config/install/image.style.square_large.yml
+++ b/core/profiles/demo_umami/config/install/image.style.square_large.yml
@@ -9,5 +9,6 @@ effects:
     id: image_scale_and_crop
     weight: 1
     data:
+      anchor: center-center
       width: 900
       height: 900
diff --git a/core/profiles/demo_umami/config/install/image.style.square_medium.yml b/core/profiles/demo_umami/config/install/image.style.square_medium.yml
index 5e924c7..e920ef9 100644
--- a/core/profiles/demo_umami/config/install/image.style.square_medium.yml
+++ b/core/profiles/demo_umami/config/install/image.style.square_medium.yml
@@ -9,5 +9,6 @@ effects:
     id: image_scale_and_crop
     weight: 1
     data:
+      anchor: center-center
       width: 600
       height: 600
diff --git a/core/profiles/demo_umami/config/install/image.style.square_small.yml b/core/profiles/demo_umami/config/install/image.style.square_small.yml
index 03b4b11..97b37fa 100644
--- a/core/profiles/demo_umami/config/install/image.style.square_small.yml
+++ b/core/profiles/demo_umami/config/install/image.style.square_small.yml
@@ -9,5 +9,6 @@ effects:
     id: image_scale_and_crop
     weight: 1
     data:
+      anchor: center-center
       width: 300
       height: 300
diff --git a/core/scripts/run-tests.sh b/core/scripts/run-tests.sh
old mode 100644
new mode 100755
diff --git a/core/tests/Drupal/KernelTests/Core/Theme/StableTemplateOverrideTest.php b/core/tests/Drupal/KernelTests/Core/Theme/StableTemplateOverrideTest.php
index 40d31e6..ff0aba1 100644
--- a/core/tests/Drupal/KernelTests/Core/Theme/StableTemplateOverrideTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Theme/StableTemplateOverrideTest.php
@@ -24,7 +24,8 @@ class StableTemplateOverrideTest extends KernelTestBase {
    */
   protected $templatesToSkip = [
     'views-form-views-form',
-    'entity-moderation-form'
+    'entity-moderation-form',
+    'image-scale-and-crop-summary',
   ];
 
   /**
