Magento – Images uploading, going to the /media/tmp, but not saving in media/catalog after saving category magento 2

image-uploadmagento2

I have created custom image attribute. This is displaying perfect. But when i save category, it is not saving.
Images are uploading perfectly, Saving at /media/tmp, but not saving in media/catalog after saving category magento 2.

Best Answer

Magento2.1 Category image upload showing preview after upload image but not working after save category.

this is magento version default bug.

To solve this issue by apply bellow patch.

Opne this url : https://github.com/magento/magento2/pull/5978/files

You have to override below core files code with file code from given URL.

vendor/magento/module-catalog/Controller/Adminhtml/Category/Image/Upload.php
vendor/magento/module-catalog/Controller/Adminhtml/Category/Save.php
vendor/magento/module-catalog/Model/Category.php
vendor/magento/module-catalog/Model/Category/Attribute/Backend/Image.php
vendor/magento/module-catalog/Model/Category/DataProvider.php

Now magento-2.1 working code for custom image attribute of category.

See complete answer for the issue : See my complete answer

Let me know if you have any query/concern from above.

Related Topic