Display SVG image in mobile app

Hi,

In mobile application I am using image widget to show image from binary data.

I am able to show image from binary data for image type png, jpeg. But when I give binary of SVG image then image

is not displayed on screen. How to show SVG image from binary data?

Best Regards,

Nitin

mvp_badge
MVP
Solution

That doesn't change the fact that SVG is text XML not a binary.

Maybe you can use the BinaryDataToText action and see if it returns a text of SVG?

mvp_badge
MVP

Hi Nitin,

I don't understand, an SVG is not a binary format, SVG is an eXtensible Markup Language (XML)-based vector graphic format for the Web. This is a text format.

The documentation states that the Image widget does not support SVG:


https://success.outsystems.com/Documentation/11/Reference/OutSystems_Language/Interfaces/Designing_Screens/Image

Instead, use the SVG Inline Widget.


See also: 

https://outsystemsui.outsystems.com/StyleGuidePreview/PatternDetail?MenuCategoryId=6&MenuSubCategorId=85


Regards,

Daniel

Hi @Daniël Kuhlmann ,

I am getting SVG image from s3 bucket. I am using HTTPRequestHandler method to get image from S3 bucket. This method is returning Binary content. 


Best Regards,

Nitin


mvp_badge
MVP
Solution

That doesn't change the fact that SVG is text XML not a binary.

Maybe you can use the BinaryDataToText action and see if it returns a text of SVG?


hello, is the "Inline SVG" widget only available for reactive web app? because i couldn't find one in the mobile app dependecies. thank you

mvp_badge
MVP

Hi Aditya,

Yes, you can reference the InlineSVG widget in the Mobile application module as well. 

  • Using the Manage Dependencies, select the OutSystemsUI Module > Utilities\InlineSVG

Hope this helps you!


Kind regards,

Benjith Sam

Hello Benjith, thanks for your answer

I tried to look up from the OutsystemsUI dependency but it didn't show up:

Could it be the OutsystemsUI's version are different?

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.