필드 · 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…

테스트 환경에서 합성 데이터를 사용하세요.

관련 생성기

시나리오 탐색