I am trying to get the category image from the below code
$collection = $this->_categoryCollectionFactory->create();
$collection->addAttributeToSelect('name','image')
->addAttributeToFilter('is_popular', array('eq' => 1))
->addAttributeToFilter('is_active',array('eq' => 1))
->addAttributeToSort('category_sort_no', 'ASC')
->setPageSize(12)
->load();
and i am looping through these but i am not getting category image.I can get category id from the collection and load the category object and get the image.But it is affecting the performance like below:
$category = $objectManager->create('Magento\Catalog\Model\Category')->load($categoryId);
$imgUrl = $category->getImageUrl();
Is there any way we can fetch the category image from the collection object?
Thanks!