Log in
Model

Image

Magento\Catalog\Model\View\Asset\Image

What it does

This class represents a product image asset in Magento 2's catalog system, managing image URLs and file paths for different image types (thumbnail, small_image, etc.).

Developers use this class when working with product images to generate proper URLs with transformation parameters (resizing, watermarks) and retrieve image file paths for caching and rendering.

Public Methods

  • getUrl()
  • getImageTransformationParameters()
  • getContentType()
  • getPath()
  • getSourceFile()
  • getSourceContentType()
  • getContent()
  • getFilePath()
  • getContext()
  • getModule()