Showing results for 
Search instead for 
Did you mean: 
Frequent Visitor

Image not loading in Power Portal

Can anyone guide me how to put a picture in a portal without storing it in a blob? I tried this method

    function toBase64(str) {
        if (!str) return null;
        var uarr = new Uint8Array(str.split(',').map(function (x) { return parseInt(x); }));
        return btoa(String.fromCharCode.apply(null, uarr));
    window.addEventListener('load', function () {
      document.querySelectorAll('img[data-entityimage]').forEach(function (img) {
          var data = img.dataset && img.dataset.entityimage;
          var base64data = data ? toBase64(data) : null;
          if (base64data) {
              img.src = 'data&colon;image/jpeg;base64,' + base64data;
I tried using this function and render it


but I got this mistake : Liquid error: Object of type 'Adxstudio.Xrm.Web.Mvc.Liquid.ImageDrop' cannot be converted to type 'System.Collections.IEnumerable'. when loading the picutre in the portal.


Anyone know what to do since I'm very new to Portals, i would apricate any help, thank you 🙂 


Helpful resources

Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

Carousel_PP_768x460_Wave2 (1).png

2022 Release Wave 2 Plan

Power Platform release plan for the 2022 release wave 2 describes all new features releasing from October 2022 through March 2023.

365 EduCon 768x460.png

Microsoft 365 EduCon

Join us for two optional days of workshops and a 3-day conference, you can choose from over 130 sessions in multiple tracks and 25 workshops.

Top Solution Authors
Users online (5,257)