Helper
Media
Magento\Swatches\Helper\Media
What it does
This helper class manages swatch attribute images in Magento 2, handling operations like moving images from temporary to permanent storage, generating different swatch image sizes (thumbnails and regular), and providing URLs/paths for swatch media files.
Developers use this when working with product attribute swatches to ensure images are properly stored, resized, and accessible throughout the system.
Public Methods
- getSwatchAttributeImage()
- moveImageFromTmp()
- generateSwatchVariations()
- getFolderNameSize()
- getImageConfig()
- getSwatchMediaUrl()
- getAttributeSwatchPath()
- getSwatchMediaPath()
- getSwatchCachePath()