Log in
Interface

ImageInterface

Magento\Catalog\Api\Data\ProductRender\ImageInterface

What it does

This interface defines the contract for product image data used in product rendering operations, such as displaying products in listings or detail pages.

Developers use this to work with product image properties like URL, dimensions (width/height), resized dimensions for performance optimization, image code (to identify where the image should be used), and labels.

It's commonly used when customizing product image display or when working with Magento's product rendering APIs.

Public Methods

  • setUrl()
  • getUrl()
  • getCode()
  • setCode()
  • setHeight()
  • getHeight()
  • getWidth()
  • setWidth()
  • getLabel()
  • setLabel()
  • getResizedWidth()
  • setResizedWidth()
  • setResizedHeight()
  • getResizedHeight()
  • getExtensionAttributes()
  • setExtensionAttributes()