I want to get the product image in Magento 2.
$collection = $this->productCollectionFactory->create()
->addStoreFilter($this->_storeManager->getStore()->getId())
->addAttributeToSelect(array('name'))
->addAttributeToFilter(
[
['attribute' => 'name', 'like' => '%' . $searchQuery . '%'],
])
->addFieldToFilter('type_id', ['eq' => "sellabletype"]);
foreach ($collection as $product) {
$image_url = $this->image->init($product, 'product_page_image_small')->setImageFile($product->getSmallImage())->resize(200, 200)->getUrl();
$searchCollection[] = ['name' => $product->getName(), 'url' => $product->getProductUrl(), 'image' => $image_url];
}
But it return only Magento_Catalog/images/product/placeholder/thumbnail.jpg url
How to get product thumbnail image url.