Log in
Interface

ConfigInterface

Magento\Catalog\Model\Product\Media\ConfigInterface

What it does

This interface defines the contract for managing product media file URLs and paths in Magento 2.

Developers use this when they need to retrieve or construct URLs and file system paths for product images and other media assets.

It provides methods to get base media URLs/paths and to convert relative file names into complete URLs or absolute file system paths.

Public Methods

  • getBaseMediaUrl()
  • getBaseMediaPath()
  • getMediaUrl()
  • getMediaPath()