diff --git a/app/code/Magento/Catalog/Model/Product/Image.php b/app/code/Magento/Catalog/Model/Product/Image.php
index 91f589f9b5bd725b4a1042016497c8ea487f1f2f..971f34e02f9e58db5dbfd80f199b93997e34092f 100644
--- a/app/code/Magento/Catalog/Model/Product/Image.php
+++ b/app/code/Magento/Catalog/Model/Product/Image.php
@@ -9,6 +9,7 @@ use Magento\Catalog\Model\Product\Image\NotLoadInfoImageException;
 use Magento\Framework\App\Filesystem\DirectoryList;
 use Magento\Framework\App\ObjectManager;
 use Magento\Framework\Image as MagentoImage;
+use Magento\Framework\Serialize\SerializerInterface;
 
 /**
  * @method string getFile()
@@ -172,6 +173,16 @@ class Image extends \Magento\Framework\Model\AbstractModel
      */
     private $imageAsset;
 
+    /**
+     * @var string
+     */
+    private $cachePrefix = 'IMG_INFO';
+
+    /**
+     * @var SerializerInterface
+     */
+    private $serializer;
+
     /**
      * Constructor
      *
@@ -190,6 +201,7 @@ class Image extends \Magento\Framework\Model\AbstractModel
      * @param array $data
      * @param \Magento\Catalog\Model\View\Asset\ImageFactory|null $viewAssetImageFactory
      * @param \Magento\Catalog\Model\View\Asset\PlaceholderFactory|null $viewAssetPlaceholderFactory
+     * @param SerializerInterface|null $serializer
      * @SuppressWarnings(PHPMD.ExcessiveParameterList)
      * @SuppressWarnings(PHPMD.UnusedLocalVariable)
      */
@@ -208,7 +220,8 @@ class Image extends \Magento\Framework\Model\AbstractModel
         \Magento\Framework\Data\Collection\AbstractDb $resourceCollection = null,
         array $data = [],
         \Magento\Catalog\Model\View\Asset\ImageFactory $viewAssetImageFactory = null,
-        \Magento\Catalog\Model\View\Asset\PlaceholderFactory $viewAssetPlaceholderFactory = null
+        \Magento\Catalog\Model\View\Asset\PlaceholderFactory $viewAssetPlaceholderFactory = null,
+        SerializerInterface $serializer = null
     ) {
         $this->_storeManager = $storeManager;
         $this->_catalogProductMediaConfig = $catalogProductMediaConfig;
@@ -223,6 +236,7 @@ class Image extends \Magento\Framework\Model\AbstractModel
             ->get(\Magento\Catalog\Model\View\Asset\ImageFactory::class);
         $this->viewAssetPlaceholderFactory = $viewAssetPlaceholderFactory ?: ObjectManager::getInstance()
             ->get(\Magento\Catalog\Model\View\Asset\PlaceholderFactory::class);
+        $this->serializer = $serializer ?: ObjectManager::getInstance()->get(SerializerInterface::class);
     }
 
     /**
@@ -356,86 +370,6 @@ class Image extends \Magento\Framework\Model\AbstractModel
         return $this;
     }
 
-    /**
-     * @param string|null $file
-     * @return bool
-     */
-    protected function _checkMemory($file = null)
-    {
-        return $this->_getMemoryLimit() > $this->_getMemoryUsage() + $this->_getNeedMemoryForFile(
-            $file
-        )
-        || $this->_getMemoryLimit() == -1;
-    }
-
-    /**
-     * @return string
-     */
-    protected function _getMemoryLimit()
-    {
-        $memoryLimit = trim(strtoupper(ini_get('memory_limit')));
-
-        if (!isset($memoryLimit[0])) {
-            $memoryLimit = "128M";
-        }
-
-        if (substr($memoryLimit, -1) == 'K') {
-            return substr($memoryLimit, 0, -1) * 1024;
-        }
-        if (substr($memoryLimit, -1) == 'M') {
-            return substr($memoryLimit, 0, -1) * 1024 * 1024;
-        }
-        if (substr($memoryLimit, -1) == 'G') {
-            return substr($memoryLimit, 0, -1) * 1024 * 1024 * 1024;
-        }
-        return $memoryLimit;
-    }
-
-    /**
-     * @return int
-     */
-    protected function _getMemoryUsage()
-    {
-        if (function_exists('memory_get_usage')) {
-            return memory_get_usage();
-        }
-        return 0;
-    }
-
-    /**
-     * @param string|null $file
-     * @return float|int
-     * @SuppressWarnings(PHPMD.NPathComplexity)
-     */
-    protected function _getNeedMemoryForFile($file = null)
-    {
-        $file = $file === null ? $this->getBaseFile() : $file;
-        if (!$file) {
-            return 0;
-        }
-
-        if (!$this->_mediaDirectory->isExist($file)) {
-            return 0;
-        }
-
-        $imageInfo = getimagesize($this->_mediaDirectory->getAbsolutePath($file));
-
-        if (!isset($imageInfo[0]) || !isset($imageInfo[1])) {
-            return 0;
-        }
-        if (!isset($imageInfo['channels'])) {
-            // if there is no info about this parameter lets set it for maximum
-            $imageInfo['channels'] = 4;
-        }
-        if (!isset($imageInfo['bits'])) {
-            // if there is no info about this parameter lets set it for maximum
-            $imageInfo['bits'] = 8;
-        }
-        return round(
-            ($imageInfo[0] * $imageInfo[1] * $imageInfo['bits'] * $imageInfo['channels'] / 8 + Pow(2, 16)) * 1.65
-        );
-    }
-
     /**
      * Convert array of 3 items (decimal r, g, b) to string of their hex values
      *
@@ -472,9 +406,7 @@ class Image extends \Magento\Framework\Model\AbstractModel
                 'filePath' => $file,
             ]
         );
-        if ($file == 'no_selection' || !$this->_fileExists($this->imageAsset->getSourceFile())
-            || !$this->_checkMemory($this->imageAsset->getSourceFile())
-        ) {
+        if ($file == 'no_selection' || !$this->_fileExists($this->imageAsset->getSourceFile())) {
             $this->_isBaseFilePlaceholder = true;
             $this->imageAsset = $this->viewAssetPlaceholderFactory->create(
                 [
@@ -682,11 +614,14 @@ class Image extends \Magento\Framework\Model\AbstractModel
     }
 
     /**
-     * @return bool|void
+     * @return bool
      */
     public function isCached()
     {
-        return file_exists($this->imageAsset->getPath());
+        return (
+            is_array($this->loadImageInfoFromCache($this->imageAsset->getPath())) ||
+            file_exists($this->imageAsset->getPath())
+        );
     }
 
     /**
@@ -856,6 +791,7 @@ class Image extends \Magento\Framework\Model\AbstractModel
         $this->_mediaDirectory->delete($directory);
 
         $this->_coreFileStorageDatabase->deleteFolder($this->_mediaDirectory->getAbsolutePath($directory));
+        $this->clearImageInfoFromCache();
     }
 
     /**
@@ -890,7 +826,7 @@ class Image extends \Magento\Framework\Model\AbstractModel
                 $image = $this->imageAsset->getPath();
             }
 
-            $imageProperties = getimagesize($image);
+            $imageProperties = $this->getimagesize($image);
 
             return $imageProperties;
         } finally {
@@ -932,4 +868,66 @@ class Image extends \Magento\Framework\Model\AbstractModel
 
         return $miscParams;
     }
+
+    /**
+     * Get image size
+     *
+     * @param string $imagePath
+     * @return array
+     */
+    private function getImageSize($imagePath)
+    {
+        $imageInfo = $this->loadImageInfoFromCache($imagePath);
+        if (!isset($imageInfo['size'])) {
+            $imageSize = getimagesize($imagePath);
+            $this->saveImageInfoToCache(['size' => $imageSize], $imagePath);
+            return $imageSize;
+        } else {
+            return $imageInfo['size'];
+        }
+    }
+
+    /**
+     * Save image data to cache
+     *
+     * @param array $imageInfo
+     * @param string $imagePath
+     * @return void
+     */
+    private function saveImageInfoToCache(array $imageInfo, string $imagePath)
+    {
+        $imagePath = $this->cachePrefix  . $imagePath;
+        $this->_cacheManager->save(
+            $this->serializer->serialize($imageInfo),
+            $imagePath,
+            [$this->cachePrefix]
+        );
+    }
+
+    /**
+     * Load image data from cache
+     *
+     * @param string $imagePath
+     * @return array|false
+     */
+    private function loadImageInfoFromCache(string $imagePath)
+    {
+        $imagePath = $this->cachePrefix  . $imagePath;
+        $cacheData = $this->_cacheManager->load($imagePath);
+        if (!$cacheData) {
+            return false;
+        } else {
+            return $this->serializer->unserialize($cacheData);
+        }
+    }
+
+    /**
+     * Clear image data from cache
+     *
+     * @return void
+     */
+    private function clearImageInfoFromCache()
+    {
+        $this->_cacheManager->clean([$this->cachePrefix]);
+    }
 }
diff --git a/app/code/Magento/Catalog/Test/Unit/Model/Product/ImageTest.php b/app/code/Magento/Catalog/Test/Unit/Model/Product/ImageTest.php
index f918692cb27535c217deb577055300e1c9cb4753..627aa1848506e3bbf23fe25b6092c040266e8c7a 100644
--- a/app/code/Magento/Catalog/Test/Unit/Model/Product/ImageTest.php
+++ b/app/code/Magento/Catalog/Test/Unit/Model/Product/ImageTest.php
@@ -5,12 +5,10 @@
  */
 namespace Magento\Catalog\Test\Unit\Model\Product;
 
-use Magento\Catalog\Model\View\Asset\Image\ContextFactory;
 use Magento\Catalog\Model\View\Asset\ImageFactory;
 use Magento\Catalog\Model\View\Asset\PlaceholderFactory;
 use Magento\Framework\TestFramework\Unit\Helper\ObjectManager as ObjectManagerHelper;
 use Magento\Framework\App\Filesystem\DirectoryList;
-use Magento\Framework\View\Asset\ContextInterface;
 
 /**
  * @SuppressWarnings(PHPMD.CouplingBetweenObjects)
@@ -73,10 +71,24 @@ class ImageTest extends \PHPUnit\Framework\TestCase
      */
     private $viewAssetPlaceholderFactory;
 
+    /**
+     * @var \Magento\Framework\Serialize\SerializerInterface|\PHPUnit_Framework_MockObject_MockObject
+     */
+    private $serializer;
+
+    /**
+     * @var \Magento\Framework\App\CacheInterface|\PHPUnit_Framework_MockObject_MockObject
+     */
+    private $cacheManager;
+
     protected function setUp()
     {
         $objectManager = new \Magento\Framework\TestFramework\Unit\Helper\ObjectManager($this);
         $this->context = $this->createMock(\Magento\Framework\Model\Context::class);
+        $this->cacheManager = $this->getMockBuilder(\Magento\Framework\App\CacheInterface::class)
+            ->disableOriginalConstructor()
+            ->getMockForAbstractClass();
+        $this->context->expects($this->any())->method('getCacheManager')->will($this->returnValue($this->cacheManager));
 
         $this->storeManager = $this->getMockBuilder(\Magento\Store\Model\StoreManager::class)
             ->disableOriginalConstructor()
@@ -112,17 +124,36 @@ class ImageTest extends \PHPUnit\Framework\TestCase
             ->disableOriginalConstructor()
             ->setMethods(['create'])
             ->getMock();
+        $this->serializer = $this->getMockBuilder(
+            \Magento\Framework\Serialize\SerializerInterface::class
+        )->getMockForAbstractClass();
+        $this->serializer->expects($this->any())
+            ->method('serialize')
+            ->willReturnCallback(
+                function ($value) {
+                    return json_encode($value);
+                }
+            );
+        $this->serializer->expects($this->any())
+            ->method('unserialize')
+            ->willReturnCallback(
+                function ($value) {
+                    return json_decode($value, true);
+                }
+            );
 
         $this->image = $objectManager->getObject(
             \Magento\Catalog\Model\Product\Image::class,
             [
+                'context' => $this->context,
                 'storeManager' => $this->storeManager,
                 'catalogProductMediaConfig' => $this->config,
                 'coreFileStorageDatabase' => $this->coreFileHelper,
                 'filesystem' => $this->filesystem,
                 'imageFactory' => $this->factory,
                 'viewAssetImageFactory' => $this->viewAssetImageFactory,
-                'viewAssetPlaceholderFactory' => $this->viewAssetPlaceholderFactory
+                'viewAssetPlaceholderFactory' => $this->viewAssetPlaceholderFactory,
+                'serializer' => $this->serializer
             ]
         );
 
@@ -354,12 +385,16 @@ class ImageTest extends \PHPUnit\Framework\TestCase
         $this->testSetGetBaseFile();
         $absolutePath = dirname(dirname(__DIR__)) . '/_files/catalog/product/watermark/somefile.png';
         $this->imageAsset->expects($this->any())->method('getPath')->willReturn($absolutePath);
+        $this->cacheManager->expects($this->once())->method('load')->willReturn(
+            json_encode(['size' => ['image data']])
+        );
         $this->assertTrue($this->image->isCached());
     }
 
     public function testClearCache()
     {
         $this->coreFileHelper->expects($this->once())->method('deleteFolder')->will($this->returnValue(true));
+        $this->cacheManager->expects($this->once())->method('clean');
         $this->image->clearCache();
     }
 
@@ -383,4 +418,24 @@ class ImageTest extends \PHPUnit\Framework\TestCase
     {
         $this->assertFalse($this->image->isBaseFilePlaceholder());
     }
+
+    public function testGetResizedImageInfoWithCache()
+    {
+        $absolutePath = dirname(dirname(__DIR__)) . '/_files/catalog/product/watermark/somefile.png';
+        $this->imageAsset->expects($this->any())->method('getPath')->willReturn($absolutePath);
+        $this->cacheManager->expects($this->once())->method('load')->willReturn(
+            json_encode(['size' => ['image data']])
+        );
+        $this->cacheManager->expects($this->never())->method('save');
+        $this->assertEquals(['image data'], $this->image->getResizedImageInfo());
+    }
+
+    public function testGetResizedImageInfoEmptyCache()
+    {
+        $absolutePath = dirname(dirname(__DIR__)) . '/_files/catalog/product/watermark/somefile.png';
+        $this->imageAsset->expects($this->any())->method('getPath')->willReturn($absolutePath);
+        $this->cacheManager->expects($this->once())->method('load')->willReturn(false);
+        $this->cacheManager->expects($this->once())->method('save');
+        $this->assertTrue(is_array($this->image->getResizedImageInfo()));
+    }
 }
diff --git a/app/code/Magento/Sales/view/adminhtml/ui_component/sales_order_view_creditmemo_grid.xml b/app/code/Magento/Sales/view/adminhtml/ui_component/sales_order_view_creditmemo_grid.xml
index ecc2b5beee32190c5e4d407ece25344840c10259..10b7b1c028c6636e8700c272fbec254e2ede2754 100644
--- a/app/code/Magento/Sales/view/adminhtml/ui_component/sales_order_view_creditmemo_grid.xml
+++ b/app/code/Magento/Sales/view/adminhtml/ui_component/sales_order_view_creditmemo_grid.xml
@@ -35,7 +35,13 @@
     <listingToolbar name="listing_top">
         <bookmark name="bookmarks"/>
         <columnsControls name="columns_controls"/>
-        <exportButton name="export_button"/>
+        <exportButton name="export_button">
+            <settings>
+                <additionalParams>
+                    <param xsi:type="string" active="true" name="order_id">*</param>
+                </additionalParams>
+            </settings>
+        </exportButton>
         <filterSearch name="fulltext"/>
         <filters name="listing_filters">
             <filterSelect name="store_id" provider="${ $.parentName }">
diff --git a/app/code/Magento/Sales/view/adminhtml/ui_component/sales_order_view_invoice_grid.xml b/app/code/Magento/Sales/view/adminhtml/ui_component/sales_order_view_invoice_grid.xml
index 3ec450a570b463c6b966364d10fdb41df05bc20b..ac1233c5e4961209433fcf6c442eb2c2fd067a06 100644
--- a/app/code/Magento/Sales/view/adminhtml/ui_component/sales_order_view_invoice_grid.xml
+++ b/app/code/Magento/Sales/view/adminhtml/ui_component/sales_order_view_invoice_grid.xml
@@ -35,7 +35,13 @@
     <listingToolbar name="listing_top">
         <bookmark name="bookmarks"/>
         <columnsControls name="columns_controls"/>
-        <exportButton name="export_button"/>
+        <exportButton name="export_button">
+            <settings>
+                <additionalParams>
+                    <param xsi:type="string" active="true" name="order_id">*</param>
+                </additionalParams>
+            </settings>
+        </exportButton>
         <filterSearch name="fulltext"/>
         <filters name="listing_filters">
             <filterSelect name="store_id" provider="${ $.parentName }">
diff --git a/app/code/Magento/Sales/view/adminhtml/ui_component/sales_order_view_shipment_grid.xml b/app/code/Magento/Sales/view/adminhtml/ui_component/sales_order_view_shipment_grid.xml
index 27cef507421632e4f798a3ad6609ff2a5f87ed37..6db77a79b8c1496900e9655d3762943c52545e43 100644
--- a/app/code/Magento/Sales/view/adminhtml/ui_component/sales_order_view_shipment_grid.xml
+++ b/app/code/Magento/Sales/view/adminhtml/ui_component/sales_order_view_shipment_grid.xml
@@ -35,7 +35,13 @@
     <listingToolbar name="listing_top">
         <bookmark name="bookmarks"/>
         <columnsControls name="columns_controls"/>
-        <exportButton name="export_button"/>
+        <exportButton name="export_button">
+            <settings>
+                <additionalParams>
+                    <param xsi:type="string" active="true" name="order_id">*</param>
+                </additionalParams>
+            </settings>
+        </exportButton>
         <filterSearch name="fulltext"/>
         <filters name="listing_filters">
             <filterSelect name="store_id" provider="${ $.parentName }">
diff --git a/app/code/Magento/Ui/Component/ExportButton.php b/app/code/Magento/Ui/Component/ExportButton.php
index 9d5f12583900316e89709bb7663a4bf74e499f38..284362a119bad030efce899ac08a4c6b127bf1c3 100644
--- a/app/code/Magento/Ui/Component/ExportButton.php
+++ b/app/code/Magento/Ui/Component/ExportButton.php
@@ -54,11 +54,13 @@ class ExportButton extends AbstractComponent
      */
     public function prepare()
     {
+        $context = $this->getContext();
         $config = $this->getData('config');
         if (isset($config['options'])) {
             $options = [];
             foreach ($config['options'] as $option) {
-                $option['url'] = $this->urlBuilder->getUrl($option['url']);
+                $additionalParams = $this->getAdditionalParams($config, $context);
+                $option['url'] = $this->urlBuilder->getUrl($option['url'], $additionalParams);
                 $options[] = $option;
             }
             $config['options'] = $options;
@@ -66,4 +68,25 @@ class ExportButton extends AbstractComponent
         }
         parent::prepare();
     }
+
+    /**
+     * Get export button additional parameters
+     *
+     * @param array $config
+     * @param ContextInterface $context
+     * @return array
+     */
+    protected function getAdditionalParams($config, $context)
+    {
+        $additionalParams = [];
+        if (isset($config['additionalParams'])) {
+            foreach ($config['additionalParams'] as $paramName => $paramValue) {
+                if ('*' == $paramValue) {
+                    $paramValue = $context->getRequestParam($paramName);
+                }
+                $additionalParams[$paramName] = $paramValue;
+            }
+        }
+        return $additionalParams;
+    }
 }
diff --git a/app/code/Magento/Ui/TemplateEngine/Xhtml/Result.php b/app/code/Magento/Ui/TemplateEngine/Xhtml/Result.php
index cda3106a14f492af4c60fa383a2278321016308d..bd1dde10f8eedbcb958290f3882ae98c3b3498a0 100644
--- a/app/code/Magento/Ui/TemplateEngine/Xhtml/Result.php
+++ b/app/code/Magento/Ui/TemplateEngine/Xhtml/Result.php
@@ -119,7 +119,7 @@ class Result implements ResultInterface
     protected function wrapContent($content)
     {
         return '<script type="text/x-magento-init"><![CDATA['
-        . '{"*": {"Magento_Ui/js/core/app": ' . str_replace(['<![CDATA[', ']]>'], '', $content) . '}}'
+        . '{"*": {"Magento_Ui/js/core/app": ' . str_replace(']]>', ']]]]><![CDATA[>', $content) . '}}'
         . ']]></script>';
     }
 }
diff --git a/app/code/Magento/Ui/Test/Unit/TemplateEngine/Xhtml/ResultTest.php b/app/code/Magento/Ui/Test/Unit/TemplateEngine/Xhtml/ResultTest.php
new file mode 100644
index 0000000000000000000000000000000000000000..e51062e1cb36b7396902b6a74728789218b13ee3
--- /dev/null
+++ b/app/code/Magento/Ui/Test/Unit/TemplateEngine/Xhtml/ResultTest.php
@@ -0,0 +1,97 @@
+<?php
+/**
+ * Copyright © Magento, Inc. All rights reserved.
+ * See COPYING.txt for license details.
+ */
+
+namespace Magento\Ui\Test\Unit\TemplateEngine\Xhtml;
+
+use Magento\Framework\TestFramework\Unit\Helper\ObjectManager;
+use Magento\Framework\View\Layout\Generator\Structure;
+use Magento\Framework\View\Element\UiComponentInterface;
+use Magento\Framework\View\TemplateEngine\Xhtml\CompilerInterface;
+use Magento\Framework\View\TemplateEngine\Xhtml\Template;
+use Magento\Ui\TemplateEngine\Xhtml\Result;
+use PHPUnit_Framework_MockObject_MockObject as MockObject;
+use Psr\Log\LoggerInterface;
+
+/**
+ * Test Class for Class Result.
+ * @see \Magento\Ui\TemplateEngine\Xhtml\Result
+ *
+ * @SuppressWarnings(PHPMD.CouplingBetweenObjects)
+ */
+class ResultTest extends \PHPUnit\Framework\TestCase
+{
+    /**
+     * @var Template|MockObject
+     */
+    private $template;
+
+    /**
+     * @var CompilerInterface|MockObject
+     */
+    private $compiler;
+
+    /**
+     * @var UiComponentInterface|MockObject
+     */
+    private $component;
+
+    /**
+     * @var Structure|MockObject
+     */
+    private $structure;
+
+    /**
+     * @var LoggerInterface|MockObject
+     */
+    private $logger;
+
+    /**
+     * @var Result
+     */
+    private $testModel;
+
+    /**
+     * @var ObjectManager
+     */
+    private $objectManager;
+
+    protected function setUp()
+    {
+        $this->template = $this->createPartialMock(Template::class, ['append']);
+        $this->compiler = $this->createMock(CompilerInterface::class);
+        $this->component = $this->createMock(UiComponentInterface::class);
+        $this->structure = $this->createPartialMock(Structure::class, ['generate']);
+        $this->logger = $this->createMock(LoggerInterface::class);
+
+        $this->objectManager = new ObjectManager($this);
+        $this->testModel = $this->objectManager->getObject(Result::class, [
+            'template' => $this->template,
+            'compiler' => $this->compiler,
+            'component' => $this->component,
+            'structure' => $this->structure,
+            'logger' => $this->logger,
+        ]);
+    }
+
+    /**
+     * Test Append layout configuration method
+     */
+    public function testAppendLayoutConfiguration()
+    {
+        $configWithCdata = 'text before <![CDATA[cdata text]]>';
+        $this->structure->expects($this->once())
+            ->method('generate')
+            ->with($this->component)
+            ->willReturn([$configWithCdata]);
+        $this->template->expects($this->once())
+            ->method('append')
+            ->with('<script type="text/x-magento-init"><![CDATA[{"*": {"Magento_Ui/js/core/app": '
+                . '["text before <![CDATA[cdata text]]]]><![CDATA[>"]'
+                . '}}]]></script>');
+        
+        $this->testModel->appendLayoutConfiguration();
+    }
+}