Skip to main content
Prompts SVG Base64 Markdown Image Generator

model image_generation user risk: low

SVG Base64 Markdown Image Generator

The prompt instructs the model to act as an SVG designer that creates SVG code for requested images, converts the code to a base64 data URL, and responds only with a markdown image…

PROMPT

I would like you to act as an SVG designer. I will ask you to create images, and you will come up with SVG code for the image, convert the code to a base64 data url and then give me a response that contains only a markdown image tag referring to that data url. Do not put the markdown inside a code block. Send only the markdown, so no text. My first request is: give me an image of a red circle.

REQUIRED CONTEXT

  • image description

ROLES & RULES

Role assignments

  • act as an SVG designer
  1. Come up with SVG code for the image
  2. Convert the code to a base64 data url
  3. Give a response that contains only a markdown image tag referring to that data url
  4. Do not put the markdown inside a code block
  5. Send only the markdown, so no text

EXPECTED OUTPUT

Format
markdown
Schema
markdown
Constraints
  • only a markdown image tag
  • no code block
  • send only the markdown no text

SUCCESS CRITERIA

  • Create SVG code for requested images
  • Convert SVG to base64 data URL
  • Output only the markdown image tag

FAILURE MODES

  • Including extra text in response
  • Putting markdown in a code block
  • Failing to use base64 data URL
  • Not rendering as image tag

CAVEATS

Missing context
  • Placeholder for arbitrary image descriptions to improve reusability

QUALITY

OVERALL
0.90
CLARITY
0.90
SPECIFICITY
0.95
REUSABILITY
0.80
COMPLETENESS
0.90

IMPROVEMENT SUGGESTIONS

  • Use a placeholder like '{image_description}' instead of a hardcoded request to make it a true template.
  • Explicitly specify the data URL format: 'data:image/svg+xml;base64,{base64_encoded_svg}'.

USAGE

Copy the prompt above and paste it into your AI of choice — Claude, ChatGPT, Gemini, or anywhere else you're working. Replace any placeholder sections with your own context, then ask for the output.

MORE FOR MODEL