enjoydevelop / magento2-module-reset-image-roles
Magento 2 module to reset image roles by direct SQL queries
Installs: 1
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 0
Type:magento2-module
Requires
- php: ~8.1.0||~8.2.0
- magento/framework: 103.0.*
README
Updates Image Roles. It copies the Base Image value to a specific Image Role (small_image, thumbnail, swatch_image).
What does this module solve?
In case when your product has the image and Base role, but misses other roles. So you can set other roles using this script.
Installation:
composer require enjoydevelop/magento2-module-reset-image-roles
bin/magento module:enable EnjoyDevelop_ResetImageRoles && bin/magento setup:upgrade && bin/magento setup:di:compile && bin/magento setup:static-content:deploy -f
Usage
Set the small_image role to the same images as used for Base Image Role
bin/magento catalog:image-roles:reset small_image
Set the small_image, thumbnail, swatch_image roles to the same images as used for Base Image Role
bin/magento catalog:image-roles:reset small_image,thumbnail,swatch_image
Set the custom_role_attribute_code role to the same images as used for Base Image Role
bin/magento catalog:image-roles:reset custom_role_attribute_code
Set the custom_role_attribute_id role to the same images as used for Base Image Role
bin/magento catalog:image-roles:reset custom_role_attribute_id