Enterprise Magento2.3.2 Unable to get Category Image Url ProgrammaticallyCategory image is not getting displayed in top navigation menu after Block overrideProduct Category Thumbnail Image Not Workingsome category image not showing magento 2Magento 2.3: category image gets overwrittenHow to get category image based on category ID?Category Image Not Showing on frontend in magento2view image magento 2.3.2 after import with magmi 7.23 of product with url

Number of matrices with bounded products of rows and columns

A curiosity on a first three natural numbers

Earliest evidence of objects intended for future archaeologists?

Chess software to analyze games

What causes burn marks on the air handler in the attic?

Repurpose telephone line to ethernet

Is there such a thing as too inconvenient?

Starships without computers?

Playing a fast but quiet Alberti bass

Are there any OR challenges that are similar to kaggle's competitions?

Can I check a small array of bools in one go?

awkward stretchy fingering

Saying something to a foreign coworker who uses "you people"

Can 'in-' mean both 'in' and 'no'?

Can I submit a paper computer science conference using an alias if using my real name can cause legal trouble in my original country

Why should I pay for an SSL certificate?

Radix2 Fast Fourier Transform implemented in C++

Would it be illegal for Facebook to actively promote a political agenda?

What is the evidence on the danger of feeding whole blueberries and grapes to infants and toddlers?

Meaning of words заштырить and отштырить

Metal that glows when near pieces of itself

When does The Truman Show take place?

Output with the same length always

Why don't politicians push for fossil fuel reduction by pointing out their scarcity?



Enterprise Magento2.3.2 Unable to get Category Image Url Programmatically


Category image is not getting displayed in top navigation menu after Block overrideProduct Category Thumbnail Image Not Workingsome category image not showing magento 2Magento 2.3: category image gets overwrittenHow to get category image based on category ID?Category Image Not Showing on frontend in magento2view image magento 2.3.2 after import with magmi 7.23 of product with url






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;








1















<?php
namespace VendorModuleControllerIndex;


use MagentoFrameworkAppActionAction;
use MagentoFrameworkControllerResultJsonFactory;
use MagentoFrameworkAppActionContext;
use MagentoFrameworkViewResultPageFactory;

class Index extends Action

protected $resultJsonFactory;
/**
* @var MagentoCatalogHelperCategory
*/
protected $categoryHelper;

/**
* @var MagentoCatalogModelCategoryRepository
*/
protected $categoryRepository;

protected $resultPageFactory;

public function __construct(Context $context,
JsonFactory $jsonFactory,
MagentoCatalogHelperCategory $categoryHelper,
MagentoCatalogModelCategoryRepository $categoryRepository,
PageFactory $pageFactory)

$this->resultJsonFactory = $jsonFactory;
$this->categoryHelper = $categoryHelper;
$this->categoryRepository = $categoryRepository;
$this->resultPageFactory = $pageFactory;
parent::__construct($context);


public function execute()

$selectedCatId = $this->getRequest()->getParam('subCatId');

$categoryObj = $this->categoryRepository->get($selectedCatId);

var_dump($categoryObj->getImageUrl());
exit;




I have set the image in admin for category Id: 358:
enter image description here



Below is the output of print_r($categoryObj->getData());



<pre>Array(
[entity_id] => 358
[attribute_set_id] => 12
[parent_id] => 2
[created_at] => 2019-08-05 11:43:07
[updated_at] => 2019-08-05 12:08:06
[path] => 1/2/358
[position] => 22
[level] => 2
[children_count] => 34
[row_id] => 358
[created_in] => 1
[updated_in] => 2147483647
[store_id] => 1
[abacos_codigo] =>
[abacos_codigo_pai] =>
[all_children] =>
[automatic_sorting] =>
[available_sort_by] =>
[category_zone] =>
[children] =>
[custom_apply_to_products] => 0
[custom_design] =>
[custom_design_from] =>
[custom_design_to] =>
[custom_layout_update] =>
[custom_use_parent_settings] => 0
[default_sort_by] =>
[description] =>
[display_mode] => PRODUCTS
[filter_price_range] =>
[hide_desktop] => 0
[image] =>
[include_in_menu] => 0
[is_active] => 1
[is_anchor] => 0
[landing_page] =>
[meta_description] =>
[meta_keywords] =>
[meta_title] =>
[mobile_img] =>
[name] => Start
[nav-image] =>
[page_layout] => category-full-width
[path_in_store] =>
[thumbnail] =>
[url_key] => start
[url_path] => start
[weltpixel_category_url] =>
[weltpixel_category_url_newtab] => 0
[weltpixel_mm_bottom_block] =>
[weltpixel_mm_bottom_block_cms] =>
[weltpixel_mm_bottom_block_type] => none
[weltpixel_mm_columns_number] => 4
[weltpixel_mm_column_width] => auto
[weltpixel_mm_display_mode] => sectioned
[weltpixel_mm_left_block] =>
[weltpixel_mm_left_block_cms] =>
[weltpixel_mm_left_block_type] => none
[weltpixel_mm_mob_hide_allcat] => 0
[weltpixel_mm_right_block] =>
[weltpixel_mm_right_block_cms] =>
[weltpixel_mm_right_block_type] => none
[weltpixel_mm_top_block] =>
[weltpixel_mm_top_block_cms] =>
[weltpixel_mm_top_block_type] => none


)










share|improve this question


























  • try print_r($categoryObj->getImageUrl());

    – Shafeel Sha
    Aug 8 at 8:28

















1















<?php
namespace VendorModuleControllerIndex;


use MagentoFrameworkAppActionAction;
use MagentoFrameworkControllerResultJsonFactory;
use MagentoFrameworkAppActionContext;
use MagentoFrameworkViewResultPageFactory;

class Index extends Action

protected $resultJsonFactory;
/**
* @var MagentoCatalogHelperCategory
*/
protected $categoryHelper;

/**
* @var MagentoCatalogModelCategoryRepository
*/
protected $categoryRepository;

protected $resultPageFactory;

public function __construct(Context $context,
JsonFactory $jsonFactory,
MagentoCatalogHelperCategory $categoryHelper,
MagentoCatalogModelCategoryRepository $categoryRepository,
PageFactory $pageFactory)

$this->resultJsonFactory = $jsonFactory;
$this->categoryHelper = $categoryHelper;
$this->categoryRepository = $categoryRepository;
$this->resultPageFactory = $pageFactory;
parent::__construct($context);


public function execute()

$selectedCatId = $this->getRequest()->getParam('subCatId');

$categoryObj = $this->categoryRepository->get($selectedCatId);

var_dump($categoryObj->getImageUrl());
exit;




I have set the image in admin for category Id: 358:
enter image description here



Below is the output of print_r($categoryObj->getData());



<pre>Array(
[entity_id] => 358
[attribute_set_id] => 12
[parent_id] => 2
[created_at] => 2019-08-05 11:43:07
[updated_at] => 2019-08-05 12:08:06
[path] => 1/2/358
[position] => 22
[level] => 2
[children_count] => 34
[row_id] => 358
[created_in] => 1
[updated_in] => 2147483647
[store_id] => 1
[abacos_codigo] =>
[abacos_codigo_pai] =>
[all_children] =>
[automatic_sorting] =>
[available_sort_by] =>
[category_zone] =>
[children] =>
[custom_apply_to_products] => 0
[custom_design] =>
[custom_design_from] =>
[custom_design_to] =>
[custom_layout_update] =>
[custom_use_parent_settings] => 0
[default_sort_by] =>
[description] =>
[display_mode] => PRODUCTS
[filter_price_range] =>
[hide_desktop] => 0
[image] =>
[include_in_menu] => 0
[is_active] => 1
[is_anchor] => 0
[landing_page] =>
[meta_description] =>
[meta_keywords] =>
[meta_title] =>
[mobile_img] =>
[name] => Start
[nav-image] =>
[page_layout] => category-full-width
[path_in_store] =>
[thumbnail] =>
[url_key] => start
[url_path] => start
[weltpixel_category_url] =>
[weltpixel_category_url_newtab] => 0
[weltpixel_mm_bottom_block] =>
[weltpixel_mm_bottom_block_cms] =>
[weltpixel_mm_bottom_block_type] => none
[weltpixel_mm_columns_number] => 4
[weltpixel_mm_column_width] => auto
[weltpixel_mm_display_mode] => sectioned
[weltpixel_mm_left_block] =>
[weltpixel_mm_left_block_cms] =>
[weltpixel_mm_left_block_type] => none
[weltpixel_mm_mob_hide_allcat] => 0
[weltpixel_mm_right_block] =>
[weltpixel_mm_right_block_cms] =>
[weltpixel_mm_right_block_type] => none
[weltpixel_mm_top_block] =>
[weltpixel_mm_top_block_cms] =>
[weltpixel_mm_top_block_type] => none


)










share|improve this question


























  • try print_r($categoryObj->getImageUrl());

    – Shafeel Sha
    Aug 8 at 8:28













1












1








1








<?php
namespace VendorModuleControllerIndex;


use MagentoFrameworkAppActionAction;
use MagentoFrameworkControllerResultJsonFactory;
use MagentoFrameworkAppActionContext;
use MagentoFrameworkViewResultPageFactory;

class Index extends Action

protected $resultJsonFactory;
/**
* @var MagentoCatalogHelperCategory
*/
protected $categoryHelper;

/**
* @var MagentoCatalogModelCategoryRepository
*/
protected $categoryRepository;

protected $resultPageFactory;

public function __construct(Context $context,
JsonFactory $jsonFactory,
MagentoCatalogHelperCategory $categoryHelper,
MagentoCatalogModelCategoryRepository $categoryRepository,
PageFactory $pageFactory)

$this->resultJsonFactory = $jsonFactory;
$this->categoryHelper = $categoryHelper;
$this->categoryRepository = $categoryRepository;
$this->resultPageFactory = $pageFactory;
parent::__construct($context);


public function execute()

$selectedCatId = $this->getRequest()->getParam('subCatId');

$categoryObj = $this->categoryRepository->get($selectedCatId);

var_dump($categoryObj->getImageUrl());
exit;




I have set the image in admin for category Id: 358:
enter image description here



Below is the output of print_r($categoryObj->getData());



<pre>Array(
[entity_id] => 358
[attribute_set_id] => 12
[parent_id] => 2
[created_at] => 2019-08-05 11:43:07
[updated_at] => 2019-08-05 12:08:06
[path] => 1/2/358
[position] => 22
[level] => 2
[children_count] => 34
[row_id] => 358
[created_in] => 1
[updated_in] => 2147483647
[store_id] => 1
[abacos_codigo] =>
[abacos_codigo_pai] =>
[all_children] =>
[automatic_sorting] =>
[available_sort_by] =>
[category_zone] =>
[children] =>
[custom_apply_to_products] => 0
[custom_design] =>
[custom_design_from] =>
[custom_design_to] =>
[custom_layout_update] =>
[custom_use_parent_settings] => 0
[default_sort_by] =>
[description] =>
[display_mode] => PRODUCTS
[filter_price_range] =>
[hide_desktop] => 0
[image] =>
[include_in_menu] => 0
[is_active] => 1
[is_anchor] => 0
[landing_page] =>
[meta_description] =>
[meta_keywords] =>
[meta_title] =>
[mobile_img] =>
[name] => Start
[nav-image] =>
[page_layout] => category-full-width
[path_in_store] =>
[thumbnail] =>
[url_key] => start
[url_path] => start
[weltpixel_category_url] =>
[weltpixel_category_url_newtab] => 0
[weltpixel_mm_bottom_block] =>
[weltpixel_mm_bottom_block_cms] =>
[weltpixel_mm_bottom_block_type] => none
[weltpixel_mm_columns_number] => 4
[weltpixel_mm_column_width] => auto
[weltpixel_mm_display_mode] => sectioned
[weltpixel_mm_left_block] =>
[weltpixel_mm_left_block_cms] =>
[weltpixel_mm_left_block_type] => none
[weltpixel_mm_mob_hide_allcat] => 0
[weltpixel_mm_right_block] =>
[weltpixel_mm_right_block_cms] =>
[weltpixel_mm_right_block_type] => none
[weltpixel_mm_top_block] =>
[weltpixel_mm_top_block_cms] =>
[weltpixel_mm_top_block_type] => none


)










share|improve this question
















<?php
namespace VendorModuleControllerIndex;


use MagentoFrameworkAppActionAction;
use MagentoFrameworkControllerResultJsonFactory;
use MagentoFrameworkAppActionContext;
use MagentoFrameworkViewResultPageFactory;

class Index extends Action

protected $resultJsonFactory;
/**
* @var MagentoCatalogHelperCategory
*/
protected $categoryHelper;

/**
* @var MagentoCatalogModelCategoryRepository
*/
protected $categoryRepository;

protected $resultPageFactory;

public function __construct(Context $context,
JsonFactory $jsonFactory,
MagentoCatalogHelperCategory $categoryHelper,
MagentoCatalogModelCategoryRepository $categoryRepository,
PageFactory $pageFactory)

$this->resultJsonFactory = $jsonFactory;
$this->categoryHelper = $categoryHelper;
$this->categoryRepository = $categoryRepository;
$this->resultPageFactory = $pageFactory;
parent::__construct($context);


public function execute()

$selectedCatId = $this->getRequest()->getParam('subCatId');

$categoryObj = $this->categoryRepository->get($selectedCatId);

var_dump($categoryObj->getImageUrl());
exit;




I have set the image in admin for category Id: 358:
enter image description here



Below is the output of print_r($categoryObj->getData());



<pre>Array(
[entity_id] => 358
[attribute_set_id] => 12
[parent_id] => 2
[created_at] => 2019-08-05 11:43:07
[updated_at] => 2019-08-05 12:08:06
[path] => 1/2/358
[position] => 22
[level] => 2
[children_count] => 34
[row_id] => 358
[created_in] => 1
[updated_in] => 2147483647
[store_id] => 1
[abacos_codigo] =>
[abacos_codigo_pai] =>
[all_children] =>
[automatic_sorting] =>
[available_sort_by] =>
[category_zone] =>
[children] =>
[custom_apply_to_products] => 0
[custom_design] =>
[custom_design_from] =>
[custom_design_to] =>
[custom_layout_update] =>
[custom_use_parent_settings] => 0
[default_sort_by] =>
[description] =>
[display_mode] => PRODUCTS
[filter_price_range] =>
[hide_desktop] => 0
[image] =>
[include_in_menu] => 0
[is_active] => 1
[is_anchor] => 0
[landing_page] =>
[meta_description] =>
[meta_keywords] =>
[meta_title] =>
[mobile_img] =>
[name] => Start
[nav-image] =>
[page_layout] => category-full-width
[path_in_store] =>
[thumbnail] =>
[url_key] => start
[url_path] => start
[weltpixel_category_url] =>
[weltpixel_category_url_newtab] => 0
[weltpixel_mm_bottom_block] =>
[weltpixel_mm_bottom_block_cms] =>
[weltpixel_mm_bottom_block_type] => none
[weltpixel_mm_columns_number] => 4
[weltpixel_mm_column_width] => auto
[weltpixel_mm_display_mode] => sectioned
[weltpixel_mm_left_block] =>
[weltpixel_mm_left_block_cms] =>
[weltpixel_mm_left_block_type] => none
[weltpixel_mm_mob_hide_allcat] => 0
[weltpixel_mm_right_block] =>
[weltpixel_mm_right_block_cms] =>
[weltpixel_mm_right_block_type] => none
[weltpixel_mm_top_block] =>
[weltpixel_mm_top_block_cms] =>
[weltpixel_mm_top_block_type] => none


)







magento2.3.2 category-image






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Aug 8 at 8:19







Dinesh Rajput

















asked Aug 7 at 5:16









Dinesh RajputDinesh Rajput

1019 bronze badges




1019 bronze badges















  • try print_r($categoryObj->getImageUrl());

    – Shafeel Sha
    Aug 8 at 8:28

















  • try print_r($categoryObj->getImageUrl());

    – Shafeel Sha
    Aug 8 at 8:28
















try print_r($categoryObj->getImageUrl());

– Shafeel Sha
Aug 8 at 8:28





try print_r($categoryObj->getImageUrl());

– Shafeel Sha
Aug 8 at 8:28










3 Answers
3






active

oldest

votes


















1














Try to use this below code in your controller. It maybe helpful for you :



protected $categoryFactory


public function __construct(
.....
MagentoCatalogModelCategoryFactory $categoryFactory
.....
)
.....
$this->categoryFactory = $categoryFactory;
.....


public function execute()

$selectedCatId = $this->getRequest()->getParam('subCatId');
$categoryObj = $this->categoryFactory->create()->load($selectedCatId);
echo $categoryObj->getImageUrl();



Output :



enter image description here






share|improve this answer



























  • Its not working. If returns null array.

    – Dinesh Rajput
    Aug 7 at 5:30











  • It seems like you didn't set image in that category.

    – Ankita Patel
    Aug 7 at 5:31











  • Please make sure that image set in that appropriate category.

    – Ankita Patel
    Aug 7 at 5:31











  • Please check my edited question with image screenshot of Admin.

    – Dinesh Rajput
    Aug 7 at 5:34











  • remove generated and clean cache please.

    – Ankita Patel
    Aug 7 at 5:39


















0














Try this:



 protected $_storeManager;

public function __construct(
MagentoStoreModelStoreManagerInterface $storeManager,
$data = []
)
$this->_storeManager = $storeManager;
parent::__construct($data);


$categoryFactory = $objectManager->create('MagentoCatalogModelResourceModelCategoryCollectionFactory');
$categories = $categoryFactory->create()
->addAttributeToSelect('*')
->setStore($this->_storeManager->getStore()); //categories from current store will be fetched

foreach ($categories as $category)
print_r($category->getImageUrl());

die('end');





share|improve this answer
































    0














    The issue was having in Enterprise Magento. Its been fixed after reindexing.






    share|improve this answer



























      Your Answer








      StackExchange.ready(function()
      var channelOptions =
      tags: "".split(" "),
      id: "479"
      ;
      initTagRenderer("".split(" "), "".split(" "), channelOptions);

      StackExchange.using("externalEditor", function()
      // Have to fire editor after snippets, if snippets enabled
      if (StackExchange.settings.snippets.snippetsEnabled)
      StackExchange.using("snippets", function()
      createEditor();
      );

      else
      createEditor();

      );

      function createEditor()
      StackExchange.prepareEditor(
      heartbeatType: 'answer',
      autoActivateHeartbeat: false,
      convertImagesToLinks: false,
      noModals: true,
      showLowRepImageUploadWarning: true,
      reputationToPostImages: null,
      bindNavPrevention: true,
      postfix: "",
      imageUploader:
      brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
      contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
      allowUrls: true
      ,
      onDemand: true,
      discardSelector: ".discard-answer"
      ,immediatelyShowMarkdownHelp:true
      );



      );













      draft saved

      draft discarded


















      StackExchange.ready(
      function ()
      StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f284633%2fenterprise-magento2-3-2-unable-to-get-category-image-url-programmatically%23new-answer', 'question_page');

      );

      Post as a guest















      Required, but never shown

























      3 Answers
      3






      active

      oldest

      votes








      3 Answers
      3






      active

      oldest

      votes









      active

      oldest

      votes






      active

      oldest

      votes









      1














      Try to use this below code in your controller. It maybe helpful for you :



      protected $categoryFactory


      public function __construct(
      .....
      MagentoCatalogModelCategoryFactory $categoryFactory
      .....
      )
      .....
      $this->categoryFactory = $categoryFactory;
      .....


      public function execute()

      $selectedCatId = $this->getRequest()->getParam('subCatId');
      $categoryObj = $this->categoryFactory->create()->load($selectedCatId);
      echo $categoryObj->getImageUrl();



      Output :



      enter image description here






      share|improve this answer



























      • Its not working. If returns null array.

        – Dinesh Rajput
        Aug 7 at 5:30











      • It seems like you didn't set image in that category.

        – Ankita Patel
        Aug 7 at 5:31











      • Please make sure that image set in that appropriate category.

        – Ankita Patel
        Aug 7 at 5:31











      • Please check my edited question with image screenshot of Admin.

        – Dinesh Rajput
        Aug 7 at 5:34











      • remove generated and clean cache please.

        – Ankita Patel
        Aug 7 at 5:39















      1














      Try to use this below code in your controller. It maybe helpful for you :



      protected $categoryFactory


      public function __construct(
      .....
      MagentoCatalogModelCategoryFactory $categoryFactory
      .....
      )
      .....
      $this->categoryFactory = $categoryFactory;
      .....


      public function execute()

      $selectedCatId = $this->getRequest()->getParam('subCatId');
      $categoryObj = $this->categoryFactory->create()->load($selectedCatId);
      echo $categoryObj->getImageUrl();



      Output :



      enter image description here






      share|improve this answer



























      • Its not working. If returns null array.

        – Dinesh Rajput
        Aug 7 at 5:30











      • It seems like you didn't set image in that category.

        – Ankita Patel
        Aug 7 at 5:31











      • Please make sure that image set in that appropriate category.

        – Ankita Patel
        Aug 7 at 5:31











      • Please check my edited question with image screenshot of Admin.

        – Dinesh Rajput
        Aug 7 at 5:34











      • remove generated and clean cache please.

        – Ankita Patel
        Aug 7 at 5:39













      1












      1








      1







      Try to use this below code in your controller. It maybe helpful for you :



      protected $categoryFactory


      public function __construct(
      .....
      MagentoCatalogModelCategoryFactory $categoryFactory
      .....
      )
      .....
      $this->categoryFactory = $categoryFactory;
      .....


      public function execute()

      $selectedCatId = $this->getRequest()->getParam('subCatId');
      $categoryObj = $this->categoryFactory->create()->load($selectedCatId);
      echo $categoryObj->getImageUrl();



      Output :



      enter image description here






      share|improve this answer















      Try to use this below code in your controller. It maybe helpful for you :



      protected $categoryFactory


      public function __construct(
      .....
      MagentoCatalogModelCategoryFactory $categoryFactory
      .....
      )
      .....
      $this->categoryFactory = $categoryFactory;
      .....


      public function execute()

      $selectedCatId = $this->getRequest()->getParam('subCatId');
      $categoryObj = $this->categoryFactory->create()->load($selectedCatId);
      echo $categoryObj->getImageUrl();



      Output :



      enter image description here







      share|improve this answer














      share|improve this answer



      share|improve this answer








      edited Aug 7 at 6:05

























      answered Aug 7 at 5:22









      Ankita PatelAnkita Patel

      8611 bronze badges




      8611 bronze badges















      • Its not working. If returns null array.

        – Dinesh Rajput
        Aug 7 at 5:30











      • It seems like you didn't set image in that category.

        – Ankita Patel
        Aug 7 at 5:31











      • Please make sure that image set in that appropriate category.

        – Ankita Patel
        Aug 7 at 5:31











      • Please check my edited question with image screenshot of Admin.

        – Dinesh Rajput
        Aug 7 at 5:34











      • remove generated and clean cache please.

        – Ankita Patel
        Aug 7 at 5:39

















      • Its not working. If returns null array.

        – Dinesh Rajput
        Aug 7 at 5:30











      • It seems like you didn't set image in that category.

        – Ankita Patel
        Aug 7 at 5:31











      • Please make sure that image set in that appropriate category.

        – Ankita Patel
        Aug 7 at 5:31











      • Please check my edited question with image screenshot of Admin.

        – Dinesh Rajput
        Aug 7 at 5:34











      • remove generated and clean cache please.

        – Ankita Patel
        Aug 7 at 5:39
















      Its not working. If returns null array.

      – Dinesh Rajput
      Aug 7 at 5:30





      Its not working. If returns null array.

      – Dinesh Rajput
      Aug 7 at 5:30













      It seems like you didn't set image in that category.

      – Ankita Patel
      Aug 7 at 5:31





      It seems like you didn't set image in that category.

      – Ankita Patel
      Aug 7 at 5:31













      Please make sure that image set in that appropriate category.

      – Ankita Patel
      Aug 7 at 5:31





      Please make sure that image set in that appropriate category.

      – Ankita Patel
      Aug 7 at 5:31













      Please check my edited question with image screenshot of Admin.

      – Dinesh Rajput
      Aug 7 at 5:34





      Please check my edited question with image screenshot of Admin.

      – Dinesh Rajput
      Aug 7 at 5:34













      remove generated and clean cache please.

      – Ankita Patel
      Aug 7 at 5:39





      remove generated and clean cache please.

      – Ankita Patel
      Aug 7 at 5:39













      0














      Try this:



       protected $_storeManager;

      public function __construct(
      MagentoStoreModelStoreManagerInterface $storeManager,
      $data = []
      )
      $this->_storeManager = $storeManager;
      parent::__construct($data);


      $categoryFactory = $objectManager->create('MagentoCatalogModelResourceModelCategoryCollectionFactory');
      $categories = $categoryFactory->create()
      ->addAttributeToSelect('*')
      ->setStore($this->_storeManager->getStore()); //categories from current store will be fetched

      foreach ($categories as $category)
      print_r($category->getImageUrl());

      die('end');





      share|improve this answer





























        0














        Try this:



         protected $_storeManager;

        public function __construct(
        MagentoStoreModelStoreManagerInterface $storeManager,
        $data = []
        )
        $this->_storeManager = $storeManager;
        parent::__construct($data);


        $categoryFactory = $objectManager->create('MagentoCatalogModelResourceModelCategoryCollectionFactory');
        $categories = $categoryFactory->create()
        ->addAttributeToSelect('*')
        ->setStore($this->_storeManager->getStore()); //categories from current store will be fetched

        foreach ($categories as $category)
        print_r($category->getImageUrl());

        die('end');





        share|improve this answer



























          0












          0








          0







          Try this:



           protected $_storeManager;

          public function __construct(
          MagentoStoreModelStoreManagerInterface $storeManager,
          $data = []
          )
          $this->_storeManager = $storeManager;
          parent::__construct($data);


          $categoryFactory = $objectManager->create('MagentoCatalogModelResourceModelCategoryCollectionFactory');
          $categories = $categoryFactory->create()
          ->addAttributeToSelect('*')
          ->setStore($this->_storeManager->getStore()); //categories from current store will be fetched

          foreach ($categories as $category)
          print_r($category->getImageUrl());

          die('end');





          share|improve this answer













          Try this:



           protected $_storeManager;

          public function __construct(
          MagentoStoreModelStoreManagerInterface $storeManager,
          $data = []
          )
          $this->_storeManager = $storeManager;
          parent::__construct($data);


          $categoryFactory = $objectManager->create('MagentoCatalogModelResourceModelCategoryCollectionFactory');
          $categories = $categoryFactory->create()
          ->addAttributeToSelect('*')
          ->setStore($this->_storeManager->getStore()); //categories from current store will be fetched

          foreach ($categories as $category)
          print_r($category->getImageUrl());

          die('end');






          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered Aug 7 at 5:39









          Shafeel ShaShafeel Sha

          50015 bronze badges




          50015 bronze badges
























              0














              The issue was having in Enterprise Magento. Its been fixed after reindexing.






              share|improve this answer





























                0














                The issue was having in Enterprise Magento. Its been fixed after reindexing.






                share|improve this answer



























                  0












                  0








                  0







                  The issue was having in Enterprise Magento. Its been fixed after reindexing.






                  share|improve this answer













                  The issue was having in Enterprise Magento. Its been fixed after reindexing.







                  share|improve this answer












                  share|improve this answer



                  share|improve this answer










                  answered Aug 7 at 8:45









                  Dinesh RajputDinesh Rajput

                  1019 bronze badges




                  1019 bronze badges






























                      draft saved

                      draft discarded
















































                      Thanks for contributing an answer to Magento Stack Exchange!


                      • Please be sure to answer the question. Provide details and share your research!

                      But avoid


                      • Asking for help, clarification, or responding to other answers.

                      • Making statements based on opinion; back them up with references or personal experience.

                      To learn more, see our tips on writing great answers.




                      draft saved


                      draft discarded














                      StackExchange.ready(
                      function ()
                      StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f284633%2fenterprise-magento2-3-2-unable-to-get-category-image-url-programmatically%23new-answer', 'question_page');

                      );

                      Post as a guest















                      Required, but never shown





















































                      Required, but never shown














                      Required, but never shown












                      Required, but never shown







                      Required, but never shown

































                      Required, but never shown














                      Required, but never shown












                      Required, but never shown







                      Required, but never shown







                      Popular posts from this blog

                      Get product attribute by attribute group code in magento 2get product attribute by product attribute group in magento 2Magento 2 Log Bundle Product Data in List Page?How to get all product attribute of a attribute group of Default attribute set?Magento 2.1 Create a filter in the product grid by new attributeMagento 2 : Get Product Attribute values By GroupMagento 2 How to get all existing values for one attributeMagento 2 get custom attribute of a single product inside a pluginMagento 2.3 How to get all the Multi Source Inventory (MSI) locations collection in custom module?Magento2: how to develop rest API to get new productsGet product attribute by attribute group code ( [attribute_group_code] ) in magento 2

                      Category:9 (number) SubcategoriesMedia in category "9 (number)"Navigation menuUpload mediaGND ID: 4485639-8Library of Congress authority ID: sh85091979ReasonatorScholiaStatistics

                      Magento 2.3: How do i solve this, Not registered handle, on custom form?How can i rewrite TierPrice Block in Magento2magento 2 captcha not rendering if I override layout xmlmain.CRITICAL: Plugin class doesn't existMagento 2 : Problem while adding custom button order view page?Magento 2.2.5: Overriding Admin Controller sales/orderMagento 2.2.5: Add, Update and Delete existing products Custom OptionsMagento 2.3 : File Upload issue in UI Component FormMagento2 Not registered handleHow to configured Form Builder Js in my custom magento 2.3.0 module?Magento 2.3. How to create image upload field in an admin form