feat(plugins/community/splatoon): add plugin (#1287)
This commit is contained in:
@@ -444,6 +444,9 @@ export const filters = {
|
||||
|
||||
/**Image to base64 */
|
||||
export async function imgb64(image, {width, height, fallback = true} = {}) {
|
||||
//Ignore already encoded-base 64
|
||||
if ((typeof image === "string")&&(image.startsWith("data:image/png;base64")))
|
||||
return image
|
||||
//Undefined image
|
||||
if (!image)
|
||||
return fallback ? "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mOcOnfpfwAGfgLYttYINwAAAABJRU5ErkJggg==" : null
|
||||
|
||||
Reference in New Issue
Block a user