Skip to content

Polpulate asset metadata on uploading the image to magento #1497

Closed
@sivaschenko

Description

@sivaschenko

Story: #1183

Preconditions (*)

  1. Install Magento 2.4-develop with ASI 2.0-develop
  2. Enable Enhanced Media Gallery

Steps to reproduce (*)

  1. Login to Admin panel
  2. Open the media gallery. I.e. from the Catalog -> Category -> Content fieldset -> Select image from gallery
  3. Click "Upload image" button and upload an image containing the title, description and keywords in the metadata

Expected result (*)

The images information should be saved to the media_gallery_asset table. The description, title fields should be populated from the image metadata. the keywords should be saved for the image

Testing

Should be checked for the next scenarios:

  • Uploading the image to the enhanced media gallery
  • Uploading the image to the old media gallery
  • Uploading the image to the category
  • Uploading the image to the Page builder
  • Runing bin/magento media-gallery:sync for images added manually to pub/media directory

Technical Details

Use the \Magento\MediaGalleryMetadataApi\Api\ExtractMetadataInterface to retrieve the metadata
The changes should be applied to \Magento\MediaGallerySynchronization\Model\CreateAssetFromFile::execute method

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions