Log in
Model

ImageUploader

Magento\Catalog\Model\ImageUploader

What it does

The ImageUploader class handles the uploading and management of catalog images in Magento 2.

Developers use this class when they need to save uploaded images to temporary directories, move images from temporary to permanent storage, and validate image file types and extensions.

It's commonly used in product image uploads, category images, and other catalog-related image operations.

Public Methods

  • setBaseTmpPath()
  • setBasePath()
  • setAllowedExtensions()
  • getBaseTmpPath()
  • getBasePath()
  • getAllowedExtensions()
  • getFilePath()
  • moveFileFromTmp()
  • saveFileToTmpDir()