Model
Config
Magento\Catalog\Model\Product\Media\Config
What it does
This class manages configuration and path generation for product media files in Magento 2.
Developers use it to get correct file paths and URLs for product images, both for permanent storage and temporary uploads.
It provides standardized methods to construct media paths like 'catalog/product' and retrieve URLs for displaying product images on the storefront.
Public Methods
- getBaseMediaPathAddition()
- getBaseMediaUrlAddition()
- getBaseMediaPath()
- getBaseMediaUrl()
- getBaseTmpMediaPath()
- getBaseTmpMediaUrl()
- getMediaUrl()
- getMediaPath()
- getTmpMediaUrl()
- getTmpMediaShortUrl()
- getMediaShortUrl()
- getTmpMediaPath()
- getMediaAttributeCodes()
- _resetState()