Log in
Model

ImageUploader

Magento\Catalog\Model\ImageUploader

What it does

The ImageUploader class handles uploading and managing catalog images in Magento 2.

Developers use this class to upload images to temporary directories, validate file types and extensions, and move images from temporary to permanent storage locations.

It's commonly used when implementing custom image upload functionality for products, categories, or other catalog entities.

Public Methods

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