Open harshdamaniahd opened 4 months ago
@harshdamaniahd We do not support SVG images on the card in Teams mobile as of now. They are supported in card icons, though. Let me get back on base64 - if possible could you share the exact base64 image url?
@harshdamaniahd I just checked with a base 64 PNG in the Image, and it worked fine. Could it be an issue with the conversion logic? Here's the image I used -
data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHElEQVQI12P4//8/w38GIAXDIBKE0DHxgljNBAAO9TXL0Y4OHwAAAABJRU5ErkJggg==
Summarising the expected image support as of today on Teams mobile -
Image type | Card Icon | Card Image | Quick View |
---|---|---|---|
PNG, JPG (base64 or URL) | β | β | β |
SVG (base64 or URL) | β | β | β |
I'll get back if there's a plan to enable SVG support on mobile for Card images. Thanks for reporting, let me know if the PNG works for you :D
@frags51 to confirm you are saying that base64 PNG images are supported in Viva Connections Card Images, correct?
@Annie-Johnson yes, that is correct.
Target SharePoint environment
SharePoint Online
What SharePoint development model, framework, SDK or API is this about?
π₯ SharePoint Framework
Developer environment
Windows
What browser(s) / client(s) have you tested
Additional environment details
Hey I created an svg img dynamicaly and it does work on card view on mobile client. it works on web.
` public get data(): IImageCardParameters {
return { iconProperty:this.properties.imageUrl, primaryText: this.properties.description, imageUrl: this.getSVG(), title: this.properties.title }; } public getSVG(): string { let images=this.state.images;
` );
also later i converted svg to base64v png and it still does not work in teams mobile app.
private async convertSvgToPngBase64(svgData: string): Promise {
// Conversion logic (as previously discussed)
// Create an Image object
const image = new Image();
// Set the src to the SVG data
image.src =
data:image/svg+xml;base64,${btoa(svgData)}
;}
Describe the bug / error
svg and base64 image not loading
Steps to reproduce
run in spfx 18.2
Expected behavior
svg or base64 should work