Citizen Developer
Timespan
explore our new search
Power Apps: Gallery YAML w/Base64 Images
Power Apps
Sep 19, 2025 4:02 AM

Power Apps: Gallery YAML w/Base64 Images

by HubSite 365 about Warner Digital

Power Apps gallery YAML: embed Base sixty-four images for portable, Dataverse-friendly reusable controls and low-code tips

Key insights

  • Base64 in Power Apps gallery YAML: Embed images as text data URIs (for example, data:image/webp;base64,...) so galleries render pixels without external hosting.
  • No external hosting: Embedding removes dependence on SharePoint or web servers, simplifies security, and reduces separate HTTP requests for small images like icons.
  • Implementation: Store images as varbinary in SQL, convert to Base64 in a view or flow, then set the gallery image property to the Base64 string in your YAML definition.
  • Format support: Use modern formats such as WebP by embedding them as Base64; this can shrink file size and speed up rendering for supported clients.
  • Limits and guardrails: Base64 strings are “chunky” — keep gallery record counts low, prefer thumbnails for list views, and note Power Apps now supports larger images (test performance on mobile).
  • Best practices: Build reusable controls and templates, document which images are embedded, and use this pattern for icons, badges, SVGs, or inline images in emails and PDFs to maintain clarity and reuse.

Overview

In a recent YouTube video, creator Warner Digital demonstrates a practical technique for embedding images directly into Power Apps galleries by converting them to Base64. The video, framed around a tip titled "Bring Your Own Pixels," shows how converting image pixels into encoded text avoids reliance on external file hosts and prevents images from vanishing when migrating or sharing gallery YAML. As a result, the snippet carries its own pixels and makes reusable controls and templates more robust across environments.

Moreover, Warner Digital highlights common scenarios where embedded images solve real problems, such as missing icons after export or broken app-scoped references. He frames the approach as especially useful for demos, templates, and lightweight controls, while also urging developers to document embedded assets so collaborators know what they are pasting. Consequently, the technique is both a tactical workaround and a documentation practice for collaborative app development.

How the Technique Works

First, the video explains the core idea: convert binary images into text using Base64, then embed the resulting string inside a gallery's YAML image property with a data URI prefix like "data:image/jpeg;base64,...". Next, creators can store binary data in a database such as SQL Server in a varbinary column, expose it via views that convert to Base64, and point Power Apps image controls at the converted string. In addition, this method supports formats that Power Apps does not always accept natively, including WebP, by wrapping the image into a compatible data URI.

Furthermore, the video walks through practical steps: export the gallery YAML, insert the Base64 strings into image properties, and then reimport or reuse the snippet in other apps. This means galleries defined in YAML can carry their images with them, eliminating broken links that occur when images reference external data sets or app-scoped files. Therefore, the workflow becomes a portable, self-contained unit for UI elements such as icons, badges, and thumbnails.

Benefits Highlighted

According to the video, a chief advantage is reduced dependency on external storage, which simplifies security and deployment because images are embedded in the app’s definition rather than hosted on another server. Moreover, embedding small images can reduce load latency since the browser or runtime does not need to perform separate HTTP requests for each asset. As a result, icons and badges that are converted to Base64 often render faster within galleries and controls.

In addition, the presenter notes that Power Apps now supports larger image and file sizes, allowing more flexibility for higher-resolution thumbnails and images when necessary. Consequently, developers can strike a balance by using thumbnails in gallery views and full-size images in detail views, which improves perceived performance without losing visual quality. Finally, embedding images also simplifies distribution for demos and templates because the assets travel with the YAML snippet.

Tradeoffs and Challenges

However, Base64 encoding has tradeoffs that the video carefully outlines. Primarily, encoding increases file size by roughly 33 percent compared to the original binary, and when many images are embedded, the app or dataset can become heavy and slow to load. Therefore, the recommendation is to keep record counts sensible and reserve embedded Base64 images for small assets like icons, badges, or a limited set of thumbnails.

Moreover, maintaining and updating embedded images can be more difficult than updating a single hosted file, especially in collaborative teams where version control and documentation are essential. In addition, mobile memory and performance constraints vary across devices, so designers must test on target hardware. Consequently, teams must balance convenience and portability against long-term maintainability and runtime cost.

Practical Advice and Next Steps

For teams interested in adopting this pattern, the video recommends using it for reusable controls, demos, and small templates rather than for large image catalogs. Furthermore, you should document embedded assets clearly so colleagues know what is included in a YAML snippet and why those assets were embedded. This helps prevent accidental duplication and supports future changes when a different approach, such as centralized hosting or Dataverse storage, becomes preferable.

Finally, the presenter invites experimentation with formats and use cases, such as embedding SVG icons or trying WebP for compact quality, while also testing conversion workflows from SQL Server or other data sources. In conclusion, Warner Digital presents a workable, well-documented technique that can improve portability and reduce broken images, provided teams weigh the performance and maintenance tradeoffs before wide adoption.

Power Apps - Power Apps: Gallery YAML w/Base64 Images

Keywords

base64 images power apps, power apps gallery base64 images, embed base64 images in power apps, power apps yaml gallery, convert images to base64 power apps, custom image gallery power apps, bring your own pixels power apps, inline base64 images power apps