toPng
and toJpeg
have been removed. These functions can still be used if
the @dicebear/converter
library is installed, which provides these two
methods.
Before:
import { createAvatar } from '@dicebear/core';
import { bottts } from '@dicebear/collection';
const avatar = createAvatar(bottts);
const png = await avatar.toPng();
After:
import { createAvatar } from '@dicebear/core';
import { bottts } from '@dicebear/collection';
import { toPng } from '@dicebear/converter';
const avatar = createAvatar(bottts);
const png = await toPng(avatar);
See Documentation
for more information.