We have problems with images in frontend side.
PHP Fatal error: Uncaught TypeError: Argument 1 passed to Magento\Catalog\Block\Product\ImageFactory::create() must be an instance of Magento\Catalog\Model\Product, array given, called in ...
If change "return $this->imageFactory->create($data);"
in this method for "return false;"
- the error disappears. But we have a new problem in different sections:
PHP Fatal error: Uncaught Error: Call to a member function toHtml() on boolean in ...
This error after getImage(...)->toHtml
and getImageUrl(...)->toHtml
I debbug params, what get methods getImage and getImageUrl. Emptiness gets there. All sections where there is a withdrawal of goods do not work on the site. The images are displayed correctly in the admin panel, but in frontend, I think the problem is in the pictures.
What can help for solve this problems? (Magento 2.2.5, php 7.1, mysql 5.7)