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 / Auto-Size Image in Gal...
Power Apps
Unanswered

Auto-Size Image in Gallery

(0) ShareShare
ReportReport
Posted on by 197

 

Is there a way to auto-adjust the size of images in a gallery to ensure the full image fits? I am using CDS to store my images. All images are sized at 300 x 300 pixels.

 

The image "envelope" in the gallery below is 128x128 and as can be seen, the images are being cropped. I don't want powerapps dictating the size of the images I save in CDS. It would be far more robust/desirable to have the image "auto-fit" in the gallery.

 

Any thoughts?

 

 

gallery.png

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

    Hi @AGS94 ,

     

    You can select the image control in the template part of gallery, and set its Size to 300 x 300 pixels.

    Capture.JPG

     

    Regards,

    Mona

  • AGS94 Profile Picture
    197 on at

     

    Thanks for the response Mona. Unfortunately 300x300 is way too large for my mobile layout.

     

    Again, I know I can go back and re-size everything manually but it is a bit surprising/disappointing that PA does not have a way to auto resize images in a gallery (unless I am missing something somewhere).

  • PowerAddict Profile Picture
    7,316 Most Valuable Professional on at
    Are you saying your images should size based on the device that is being used?

    ---
    If you like this reply, please give kudos. And if this solves your problem, please accept this reply as the solution. Thanks!

    Hardit(Haman)
  • PowerAddict Profile Picture
    7,316 Most Valuable Professional on at

    Hi @AGS94 

     

    I think I understood what you are asking. Your images are 300 x 300. Your gallery image control is set to 128 x 128. And this is causing your images to get cropped. 

     

    Can you tell me what the Image Position property of your image is? See below:

     

    GalleryImage.PNG

     

    Can you play with that property and set it to may be Fill or Fit?

     

    ---
    If you like this reply, please give kudos. And if this solves your problem, please accept this reply as the solution. Thanks!

    Hardit(Haman)

     

  • AGS94 Profile Picture
    197 on at

     

    Hardit,

     

    I am saying the image element of the gallery (when loaded from a data source) should work like the standard image control.

     

    With the latter, regardless of the image size, it fills the frame as follows:

     

    image frame.gif

     

    On the other hand, when you are calling an image from a data source (at least when using CDS - I have not checked other data sources),  the image element performs as follows (note the same image file was used on both cases and is 300x300 pixels):

     

    gallery image.gif 

  • AGS94 Profile Picture
    197 on at

     

    Hardit,

     

    Just saw your second reply. Had previously tried those settings too. Some looked better than others, but none worked as needed.

     

    Seems odd that Microsoft has not worked this out and/or that others have not had this issue. Hoping I am missing something, but have no idea what it would be.

  • Verified answer
    PowerAddict Profile Picture
    7,316 Most Valuable Professional on at

    Thanks for the detailed response. I am attaching a document that shows all the properties of my image control within a Gallery. The image I am pulling is a user record's image from CDS. The original image is bigger than 300 by 300. Gallery image size is set to 128 by 128. 

     

    Also, here is the behaviour I am seeing. Let me know if this looks good:

     

    UserImage.gif

    ---
    If you like this reply, please give kudos. And if this solves your problem, please accept this reply as the solution. Thanks!

    Hardit(Haman)

  • mmhailye Profile Picture
    33 on at

    Hello AGS94,

     

    I built a quick test App with a CDS custom entity storing images.  It seems the best property setting is "stretch" for the image control within the gallery. "Fill" and "Fit" do work also, but not as smoothly as "stretch".  

     

    Mike

     

    Image sizing test App with CDS.PNG

     

     

  • AGS94 Profile Picture
    197 on at

    Thanks Hardit. That is what I am looking for. Not sure why mine is not resizing, but I will use your settings and see how it goes. 

  • AGS94 Profile Picture
    197 on at

    Thanks Mike. Will also give that a shot.

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 796 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 327 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard