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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Image Quality in CDS 2.0
Power Apps
Answered

Image Quality in CDS 2.0

(0) ShareShare
ReportReport
Posted on by 102

Hi Community,

 

I have seen some related posts, but I feel like I need some confirmation.

 

I have a camera control and image download control on my PowerApp.  User takes a picture or downloads an image (usually jpg) into a collection which I show in a gallery.  The user can select images in the gallery and see detail in full page image control screen.  Quality is great.  So far so good.

 

Then the user selects one or more images to save, and these are patched to CDS 2.0 entity image field.

 

Now the user shows all images from entity in a gallery.  They select one to see a large full page image control screen.  Quality is very bad - very blurry - resolution of original is gone.

 

This image function is part of a much larger mobile management app that has been under development for some time.  I could swear that this was not an issue earlier on in the program.

 

What am I missing?  Can anyone pass along some help on this?

 

Collection image:

CollectionImage.JPG

 

 

Patched image:CDS Patched Image.JPG

Categories:
I have the same question (0)
  • v-monli-msft Profile Picture
    Microsoft Employee on at

    Hi @lknudson ,

     

    Can you please share the related formulas here?

     

    Regards,

    Mona

  • lknudson Profile Picture
    102 on at

    Collection PictureList patches to custom CDS Entity DailyJobLogPictures with:

     

    ForAll(PictureList,Patch(DailyJobLogPictures,Defaults(DailyJobLogPictures),{APrimaryName:"Pics",PicCompany:CurCo,PicJobID:CurJob, PicDate:dfltDate,PicImage:Ppic, PicGeo: Concatenate(Text(Location.Latitude), " ", Text(Location.Longitude)),PicNoteID:PNoteID,PicDesc:PicNote}))

     

    The Image in both cases is:

    [ Gallery of Collection or patched CDS ].Selected.IPpic

    Image Position: Fit

     

    Is this what you wanted?

     

    Thanks!

  • lknudson Profile Picture
    102 on at

    OK, I guess I found out what's at the root of problem.

    Common Data Service > Types of Entity Fields:

    • "When an image is uploaded, it will be resized to a maximum size of 144 pixels by 144 pixels. People should resize or crop the images before they upload them so that they will display well using this size. All images are cropped to be square. If both sides of an image are smaller than 144 pixels, the image will be cropped to be a square with the dimensions of the smaller side."

    Ouch!

     

     I had switched to CDS from SQL data source a while ago in order to add in attachment ability for records, but now I see the image capability seems to be virtually only able to handle thumbnail quality images.

     

    Any ideas for me here?

     

    Thanks!

  • Verified answer
    PaulD1 Profile Picture
    2,914 on at

    You could go back to using SQL. You can use varbinary(Max) to store image data (actually, any file data) from the Add Picture control. You can use varchar(Max) if storing data from the camera control.

    Tip: If you want to display an uploaded image back in PowerApps, create a view using the For JSON command to convert varbinary to datauri - this gives a big speed boost displaying images.

    You might also consider storing your image data in Azure Blob storage and simply storing a 'pointer' to the image data.

  • lknudson Profile Picture
    102 on at

    If I go back to SQL, I'll need to work out accomodation for PDF attachments which I can probably do with more pointer work.

     

    I see that Todd Baginski has a good tutorial on BLOB storage, so I'm going to see if that might work for both PDF and Image requirements:

    http://toddbaginski.com/blog/how-to-work-with-azure-blob-storage-in-powerapps/  

     

    Thanks for the response!

  • PaulD1 Profile Picture
    2,914 on at

    You can use the same technique for PDF if you want. Use the Add Picture control, when the dialog appears, set the file filter to All Files* and just select your PDF. Patch the selected file data into a varbinary(max) field just as you would with an image.

    * Unfortunately I don't think you can specify the file filter you want, so users will need to be trained to change from 'image files' to 'all files' so they can see and add their PDFs.

     

    Azure Blob storage is also a good option. Shane Young has a good video on that on YouTube.

  • lknudson Profile Picture
    102 on at

    Thanks!

  • richdiMSFT Profile Picture
    Microsoft Employee on at

    You could also store the images as an attachment link you are for the PDFs. It won't be as easy for getting and retrieving them for your app. But they can be stored in CDS. 

     

    A true image type has been a common customer request so I expect we will make this easier with CDS as we more tightly integrated. 

     

    Hope this helps,

    Rich

  • Black_Magic100 Profile Picture
    47 on at

    Hey not to hijack your post, but how did you display your image that was stored in the collection to be so large.  I can get them to show using the gallery control, but that is with a 144x144 image.  None of the other larger controls seem to work.

  • lknudson Profile Picture
    102 on at

    If this question is @lknudson, it is just showing up within a regular image control with reference to collection:

    ImageGallery.Selected.IPpic

    However, once it is patched to CDS from collection, it lowers the quality to the 144x144.

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
Vish WR Profile Picture

Vish WR 914

#2
11manish Profile Picture

11manish 627

#3
Valantis Profile Picture

Valantis 598

Last 30 days Overall leaderboard