version Magento 2.2.2

Class Magento\Catalog\Model\View\Asset\Image not found in line 8

the following file

namespace Vnecoms\Vendors\Model\View\Asset;
use Magento\Catalog\Model\Product\Media\ConfigInterface;
use Magento\Framework\Encryption\EncryptorInterface;
use Magento\Framework\View\Asset\ContextInterface;

class Image extends \Magento\Catalog\Model\View\Asset\Image
     * Image constructor.
     * @param ConfigInterface $mediaConfig
     * @param ContextInterface $context
     * @param EncryptorInterface $encryptor
     * @param string $filePath
     * @param array $miscParams
    public function __construct(
        ConfigInterface $mediaConfig,
        ContextInterface $context,
        EncryptorInterface $encryptor,
        array $miscParams = []
    ) {
        parent::__construct($mediaConfig, $context, $encryptor, $filePath, $miscParams);

actually this line:

class Image extends \Magento\Catalog\Model\View\Asset\Image

1 Answer 1


Seems something wrong with your files, because that file exists in the Magento ver. 2.2.2. You can find it in the official repository and copy to your server https://github.com/magento/magento2/blob/2.2.2/app/code/Magento/Catalog/Model/View/Asset/Image.php

PS: I strongly recommend you to check all Magento files.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.