I'm using Magento 2.2.5 and when we visit listing or product page Magento creates the various sizes of images in pub/media/catalog/product/cache/ directory which I don't need except some.
I have checked file vendor/magento/framework/Config/etc/view.xsd
but, nothing found related to stop/disable image generation.
As this creates lots of images and acquires disk spaces.
How to disable a particular type of image generation or anyone know the flow of image generation?
vendor/magento/module-catalog/Model/View/Asset/Image.php
file returns the HASH path.