web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / PowerApps AddPicture C...
Power Apps
Unanswered

PowerApps AddPicture Control Image Gets Cropped After SubmitForm()

(1) ShareShare
ReportReport
Posted on by 36
I am using an AddPicture control inside an EditForm to upload images of chemical structures to a SharePoint library. When I initially select the image using the AddPicture control, it shows the full image correctly. However, after submitting the form with SubmitForm(), the image that gets stored in SharePoint and shown in a Gallery is cropped (left and right sides are cut off). I tried chaning every possible setting on AddPicture1 and Image1 but nothing works. Any ideas how to solve this? 

Code:
- Struktura_DataCard1:
    Control: TypedDataCard@1.0.7
    Variant: ClassicLargePicture
    Properties:
      DataField: ="crc89_test"
      Default: =ThisItem.Struktura3
      DisplayName: =DataSourceInfo([@Naročila],DataSourceInfo.DisplayName,Struktura3)
      Height: =140
      Required: =false
      Update: =Image1.Image
      Width: =824
      X: =0
      Y: =3
    Children:
      - DataCardKey1:
          Control: Label@2.5.1
          MetadataKey: FieldName
          Properties:
            AutoHeight: =true
            BorderColor: =RGBA(0, 0, 0, 1)
            Color: =App.Theme.Colors.Darker10
            FontWeight: =FontWeight.Bold
            Height: =34
            Size: =11.7
            Text: ="Struktura"
            Width: =(Parent.Width - 60) * 0.4
            Wrap: =false
            X: =26
            Y: =10
      - Image1:
          Control: Image@2.2.3
          MetadataKey: FieldValue
          Properties:
            BorderColor: =If(IsBlank(Parent.Error), Parent.BorderColor, Color.Red)
            DisplayMode: =Parent.DisplayMode
            Height: =AddPicture1.Height
            Image: =If(IsBlank(AddPicture1.Media), Parent.Default, AddPicture1.Media)
            Tooltip: =Parent.DisplayName
            Width: =AddPicture1.Width
            X: =AddPicture1.X
            Y: =AddPicture1.Y
      - AddPicture1:
          Control: AddMedia@2.2.1
          MetadataKey: AddPicture
          Properties:
            Height: =150
            TabIndex: =5
            Width: =634
            X: =160
            Y: =10
      - ErrorMessage1:
          Control: Label@2.5.1
          MetadataKey: ErrorMessage
          Properties:
            AutoHeight: =true
            BorderColor: =RGBA(0, 0, 0, 1)
            Color: =RGBA(168, 0, 0, 1)
            FontWeight: =FontWeight.Semibold
            Height: =10
            Live: =Live.Assertive
            PaddingBottom: =0
            PaddingLeft: =0
            PaddingRight: =0
            PaddingTop: =0
            Size: =14
            Text: =Parent.Error
            Visible: =Parent.DisplayMode=DisplayMode.Edit
            Width: =Parent.Width - 60
            X: =30
            Y: =Image1.Y + Image1.Height
      - StarVisible1:
          Control: Label@2.5.1
          MetadataKey: FieldRequired
          Properties:
            Align: =Align.Center
            BorderColor: =RGBA(0, 0, 0, 1)
            Color: =App.Theme.Colors.Darker30
            Height: =DataCardKey1.Height
            Text: ="*"
            Visible: =And(Parent.Required, Parent.DisplayMode=DisplayMode.Edit)
            Width: =30
            Wrap: =false
            Y: =DataCardKey1.Y
Categories:
I have the same question (2)
  • MParikh Profile Picture
    313 Super User 2025 Season 2 on at

    Instead of submitting Image1.Image, submit AddPicture1.Media directly, which is the actual image as captured.

    Update this line:

    Update: =Image1.Image
    to:
    Update: =AddPicture1.Media

    This change ensures the full original image binary is uploaded, not the preview-rendered one.

  • DZ-14051501-0 Profile Picture
    36 on at
    @MParikh 

    I tried this but I am still getting cropped image after saving. 

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 717 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 329 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard