Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
validate_image_info_rollback.php
Go to the documentation of this file.
1 <?php
8 
10 $filesystem = $objectManager->create(\Magento\Framework\Filesystem::class);
11 
13 $config = $objectManager->get(\Magento\Catalog\Model\Product\Media\Config::class);
14 
16 $tmpDirectory = $filesystem->getDirectoryRead(\Magento\Framework\App\Filesystem\DirectoryList::MEDIA);
17 
18 $targetTmpFilePath = $tmpDirectory->getAbsolutePath($config->getBaseTmpMediaPath() . '/magento_small_image.jpg');
19 if (file_exists($targetTmpFilePath)) {
21 }