문제

Is there a CLI command (either bin/magento, n98, or custom) in Magento 2 that can flush the images cache to perform the same function as clicking the "Flush Images Cache" button in the web admin panel?

올바른 솔루션이 없습니다

다른 팁

Not aware of one.

If in doubt write your own.

https://github.com/magento/magento2/blob/2eb6f847531d2308a010c13464a83399416a9e89/app/code/Magento/Backend/Controller/Adminhtml/Cache/CleanImages.php#L30

 $this->_objectManager->create(\Magento\Catalog\Model\Product\Image::class)->clearCache();

Update

Created one

https://github.com/DominicWatts/ImageCache

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 magento.stackexchange
scroll top