Log in
Model

Config

Magento\Catalog\Model\Product\Media\Config

What it does

This class provides configuration and path/URL generation methods for product media files in Magento 2.

Developers use it to get filesystem paths and URLs for product images, both for permanent storage and temporary uploads.

It handles path normalization and provides consistent locations for catalog product images across the application.

Public Methods

  • getBaseMediaPathAddition()
  • getBaseMediaUrlAddition()
  • getBaseMediaPath()
  • getBaseMediaUrl()
  • getBaseTmpMediaPath()
  • getBaseTmpMediaUrl()
  • getMediaUrl()
  • getMediaPath()
  • getTmpMediaUrl()
  • getTmpMediaShortUrl()
  • getMediaShortUrl()
  • getTmpMediaPath()
  • getMediaAttributeCodes()
  • _resetState()