フィールド · Data Uri

フィールド · Data Uri · image.dataUri. 生成メソッド · 例

image.dataUri

生成設定

生成したデータはここに表示されます。

パラメーター & 例

Generates a random data uri containing an URL-encoded SVG image or a Base64-encoded SVG image.

image.dataUri(options?: { width?, height?, color?, type? })
options
Options for generating a data uri.
options.width
The width of the image. Defaults to a random integer between 1 and 3999.
options.height
The height of the image. Defaults to a random integer between 1 and 3999.
options.color
The color of the image. Must be a color supported by svg. Defaults to a random color.
options.type
The type of the image. Defaults to a random type.

例

"data:image/svg+xml;charset=UTF-8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20version%3D%221.1%22%20baseProfile%3D%22full%22%20width%3D%222672%22%20height%3D%22546%22%3E%3Crect%20…

テスト環境で合成データを使用してください。

関連ジェネレーター

シナリオを見る