I want to add an image to an item using powershell script and here is my code. I don't know what i'm missing..
$item.Editing.BeginEdit() [Sitecore.Data.Fields.ImageField]$fieldValueLink = $Item.Fields[$templateField.DisplayName] $fieldValueLink.Width = 1324 $fieldValueLink.Height = 577 $fieldValueLink.Alt="Image" $fieldValueLink.Value = $itemRow.$fieldTrimmedValue $item[$templateField.DisplayName] = $itemRow.$fieldTrimmedValue; $item.Editing.EndEdit() | Out-Null$item.Editing.BeginEdit()
[Sitecore.Data.Fields.ImageField]$fieldValueLink = $Item.Fields[$templateField.DisplayName]
$fieldValueLink.Width = 1324
$fieldValueLink.Height = 577
$fieldValueLink.Alt="Image"
$fieldValueLink.Value = $itemRow.$fieldTrimmedValue
$item[$templateField.DisplayName] = $itemRow.$fieldTrimmedValue;
$item.Editing.EndEdit() | Out-Null