Converting https link images/icons to Base 64

If you have a column of images/icons in https links format like below:

Then you can convert it to base 64 URL format, which is the acceptable format by the xViz Performance Flow visual (as it is certified):

Steps to be followed in Transform Editor/Power Query:

  1. Create a custom function as shown in the snippet below

  • "ImageUrl" is the parameter here

  • The prefix of "data:image/jpeg;base64, " must be adjusted as per the image extension, i.e. replace the "jpeg" with the extension of the image that you are using (eg: png, etc.)

    Source = (ImageUrl as text) as text =>
    BinaryContent = Web.Contents(ImageUrl),
    Base64 = "data:image/jpeg;base64, " & Binary.ToText(BinaryContent, BinaryEncoding.Base64)
  1. Invoke the custom function in the data table:

This will result in a new column named "Image" which will contain the Base 64 URLs. Use this column in the xViz Performance Flow visual.

Last updated