Log in
Model

GetAssetFromPath

Magento\MediaGallerySynchronization\Model\GetAssetFromPath

What it does

This class retrieves or creates a media asset object from a file path.

It checks if an asset already exists in the gallery for the given path and merges existing metadata (like title and ID) with fresh file data (like dimensions and hash).

Developers use this during media synchronization to ensure assets have both up-to-date file information and preserved database metadata.

Public Methods

  • execute()