Is there anyway in BS to add some custom SVG icons to the media library?
The CreateIconInput
accepts assetPath
, how to set it as a custom icon?
Is there anyway in BS to add some custom SVG icons to the media library?
The CreateIconInput
accepts assetPath
, how to set it as a custom icon?
Hi @Amerehei,
Unfortunately, we don’t currently have the ability to create custom SVG icons. You would need to use one of the supported image formats using the createImage
mutation:
enum ImageFormatInput {
jpeg
jpg
gif
png
tiff
tif
jpegMime
gifMime
pngMime
tiffMime
}
For example to load PNG from URL:
#create Image from URL
mutation createImageFromUrl($ws: String! $x:Float! $y:Float! $title:String! $imageFormat:ImageFormatInput! $url:String! ) {
createImage(
workspaceId: $ws
input: {
pinned:false
title:$title
imageFormat: $imageFormat
sourceUrl: $url
width:200
height:200
transform: {
x: $x
y: $y
#scale:$scale
}
})
{
content{ uploadId url fields}
preview{uploadId url fields}
image{id pinned width height ingestionState}
}
}
variables:
{
"ws": "{{workspaceID}}",
"title":"testimage.jpeg",
"imageFormat":"png",
"previewFormat":"png",
"url":"http://www.pngall.com/wp-content/uploads/5/Explosion-Boom.png",
"x":0,
"y":0,
"scale":1
}
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.