Magento 2 how to override theme-adminhtml-backend view.xml in custom module?
-
15-04-2021 - |
سؤال
By default Magento 2 creates more than 20 duplicates of each product image..! (why???)
I have got this down to 5 using view.xml in my theme, but there is one extra set of image sizes I need to change, these are set in
/vendor/magento/theme-adminhtml-backend/etc/view.xml
.
They are: product_listing_thumbnail, product_listing_thumbnail_preview, product_thumbnail_image.
I want to update it using my custom module. I have it at this path
app/code/Vendor/Module/view/adminhtml/etc/view.xml
.
But this is wrong. Is there a correct path that will work? (If creating an admin theme is the only way then I guess I could do that, but seems overkill for just one small change).
(Have spent ages looking online and through docs but can only find info for frontend view.xml, which I am already using, and putting the image names in this file does not work).
Many Thanks!
المحلول
This cannot be done using a custom module as the file is theme specific. if you update your theme etc/view.xml and include the additional elements this should create the additional required images you need
نصائح أخرى
please try:-
override view.xml in your theme
path:- app/design/adminhtml/Vander/your-them/etc/view.xml