- Issue created by @Cayenne
- πΊπΈUnited States Nathaniel
Here's a snippet from the migration code. I think you are looking for 'field_image' 'target_id' - this is the file ID (fid).
The 'pid' or 'album_id' is the album node ID (nid).
<?php // Create new photos_image entity. $photosImage = $this->entityTypeManager->getStorage('photos_image')->create([ 'uid' => $row->getDestinationProperty('uid'), 'album_id' => $row->getDestinationProperty('pid'), 'title' => $title, 'weight' => $row->getDestinationProperty('wid'), 'description' => $row->getDestinationProperty('des'), 'field_image' => [ 'target_id' => $fid, 'alt' => $title, 'title' => $title, 'width' => $image->getWidth(), 'height' => $image->getHeight(), ], ]); ?>
- πΊπΈUnited States Nathaniel
Marking as fixed. Comment here or open a new issue if needed.
- Status changed to Fixed
over 1 year ago 9:49pm 21 April 2023 Automatically closed - issue fixed for 2 weeks with no activity.