-
Notifications
You must be signed in to change notification settings - Fork 9.4k
Closed
Labels
Component: BackendComponent: ImageIssue: Clear DescriptionGate 2 Passed. Manual verification of the issue description passedGate 2 Passed. Manual verification of the issue description passedIssue: ConfirmedGate 3 Passed. Manual verification of the issue completed. Issue is confirmedGate 3 Passed. Manual verification of the issue completed. Issue is confirmedIssue: Format is validGate 1 Passed. Automatic verification of issue format passedGate 1 Passed. Automatic verification of issue format passedReported on 2.3.4Indicates original Magento version for the Issue report.Indicates original Magento version for the Issue report.Reproduced on 2.4.xThe issue has been reproduced on latest 2.4-develop branchThe issue has been reproduced on latest 2.4-develop branch
Description
Preconditions (*)
- Magento 2.3.4
Steps to reproduce (*)
- Create a Category and add an image to that category.
- I need to display the category image of few categories based on id in homepage. So i have try to use the code in frontend as below,
$category->getImageUrl()
$category->getImage()
- But it returns the tmp path image of that category.
- I have even tried using the above codes for getting category image name in vendor/magento/module-catalog/view/frontend/templates/category/image.phtml but end up with getting wrong result.
Expected result (*)
-
$category->getImageUrl() - It should return full path of category image(localhost/ver1/pub/media/catalog/category/imagename.jpg)
-
$category->getImage()- It should return only the name of category image(imagename.jpg)
Actual result (*)
- Both the code returns temporary(tmp) path image of the category (/localhost/ver1/pub/media/catalog/tmp/category/imagename.jpg)
2.Couldn't get the filename of the category image separately.
Metadata
Metadata
Assignees
Labels
Component: BackendComponent: ImageIssue: Clear DescriptionGate 2 Passed. Manual verification of the issue description passedGate 2 Passed. Manual verification of the issue description passedIssue: ConfirmedGate 3 Passed. Manual verification of the issue completed. Issue is confirmedGate 3 Passed. Manual verification of the issue completed. Issue is confirmedIssue: Format is validGate 1 Passed. Automatic verification of issue format passedGate 1 Passed. Automatic verification of issue format passedReported on 2.3.4Indicates original Magento version for the Issue report.Indicates original Magento version for the Issue report.Reproduced on 2.4.xThe issue has been reproduced on latest 2.4-develop branchThe issue has been reproduced on latest 2.4-develop branch