I suspect the problem is with the actual Base64 data. Otherwise it looks good to me. See this fiddle where a similar scheme is working. You may try specifying the character set.

<div>
  <p>Taken from wikpedia</p>
  <img src="data:image/png;base64, iVBORw0KGgoAAAANSUhEUgAAAAUA
    AAAFCAYAAACNbyblAAAAHElEQVQI12P4//8/w38GIAXDIBKE0DHxgljNBAAO
        9TXL0Y4OHwAAAABJRU5ErkJggg==" alt="Red dot" />
</div>
Run code snippetEdit code snippet Hide Results Copy to answer Expand

You can try this Base64 decoder to see whether your Base64 data is correct or not.

Answer from VinayC on Stack Overflow
๐ŸŒ
Elmah.io
elmah.io โ€บ tools โ€บ base64-image-encoder
Base64 Image Encoder - Convert any image file or URL online
Once converted to Base64, encoded image data will look similar to this (shortened for simplicity): iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAMAAABEpIrGAAAABGdBTUEAALGPC/xhBQAAAAFzUkdCAK7OHOkAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgwnLpRPAAA... The string can be used instead of an URL in the src attribute of the img element in HTML:
๐ŸŒ
Base64.Guru
base64.guru โ€บ home โ€บ base64 converter โ€บ base64 encode
Image to Base64 | Base64 Encode | Base64 Converter | Base64
Convert image to Base64 online and use the result string as data URI, img src, css background-url, and others
๐ŸŒ
Base64 Image Encoder
base64-image.de
Convert Images to Base64 Online โ€” Free Encoder & Optimizer | base64-image.de
Email clients often block external images by default. Base64 encoded images are embedded directly in your email HTML, ensuring your images display immediately without requiring user permission or external server access.
๐ŸŒ
Mozilla
developer.mozilla.org โ€บ en-US โ€บ docs โ€บ Web โ€บ URI โ€บ Reference โ€บ Schemes โ€บ data
data: URLs - URIs - MDN Web Docs - Mozilla
1 month ago - The scheme of the URL. ... The MIME type indicating the type of data, such as image/jpeg for a JPEG image file. If omitted, defaults to text/plain;charset=US-ASCII. You can find a full dissection of MIME type structure and a table of common MIME types on the web. ... Indicates that the data should be base64-decoded; see encoding data into base64 format.
๐ŸŒ
DebugBear
debugbear.com โ€บ blog โ€บ base64-data-urls-html-css
Page Speed: Avoid Large Base64 data URLs in HTML and CSS | DebugBear
April 15, 2026 - These files are encoded as a text ... also referred to as data URIs. Base64 is a binary-to-text encoding method that converts binary data into a string using 64 ASCII characters....
๐ŸŒ
MDN Web Docs
developer.mozilla.org โ€บ en-US โ€บ docs โ€บ Web โ€บ HTTP โ€บ Basics_of_HTTP โ€บ Data_URIs
data: URLs - URIs | MDN
April 25, 2022 - The scheme of the URL. ... The MIME type indicating the type of data, such as image/jpeg for a JPEG image file. If omitted, defaults to text/plain;charset=US-ASCII. You can find a full dissection of MIME type structure and a table of common MIME types on the web. ... Indicates that the data should be base64-decoded; see encoding data into base64 format.
๐ŸŒ
Base64.Guru
base64.guru โ€บ home โ€บ tools
Data URL to image | Tools | Base64
If I understand correctly, you want to extract Base64 values and save them as images/files into a directory? If so, then you need to develop a parser using any programming language that allows file manipulation. ... If someone were to create a page like this, but it was reached via a URL like https://base64.guru/tools/data-url-to-image/(Image โ†’ Base64 โ†’ Percent-encoding) eg; https://base64.guru/tools/data-url-to-image/data:image/gif;base64,R0lGODlhZABkAPcAAAAAAAAAMwAAZgAAmQAAzAAA/wArAAArMwArZgArmQArzAAr/wBVAABVMwBVZgBVmQBVzABV/wCAAACAMwCAZgCAmQCAzACA/wCqAACqMwCqZgCqmQCqzACq/wDVAADVMwDVZgDV
Find elsewhere
๐ŸŒ
CSS-Tricks
css-tricks.com โ€บ data-uris
Data URIs | CSS-Tricks
October 30, 2024 - Itโ€™s hard to maintain site with embedded data URIs for everything. Itโ€™s easier to just update an image and replace it. If you are using PHP (or PHP as CSS), you could create data URIs on the fly like this: <?php echo base64_encode(file_get_contents("../images/folder16.gif")) ?>
๐ŸŒ
Formspree
formspree.io โ€บ blog โ€บ image-to-base64
How to Convert an Image URL to Base64 | Formspree
August 28, 2024 - If you are looking to convert image URLs to Base64 images occasionally, an online Base64 encoder offers a quick and easy solution. These web-based tools typically require you to simply paste the image URL or upload the image file.
๐ŸŒ
AskApache
askapache.com โ€บ / โ€บ askapache online tools โ€บ convert image base64 encoder
Convert Image Base64 Encoder - AskApache
September 18, 2022 - These can be included in CSS as ... requests. Background images can be encoded using the data URI scheme: url('data:image/png;base64, [data]) [ CSS ] Requires: RFC2397 data uri support....
๐ŸŒ
PixelPanda
pixelpanda.ai โ€บ home โ€บ free tools โ€บ image to base64
Image to Base64 โ€” Convert Any Image to Base64 Online Free | PixelPanda
The format looks like this: data:image/png;base64,iVBORw0KGgo... You can use it anywhere you'd normally put an image URL -- img src attributes, CSS url() values, JavaScript Image objects.
๐ŸŒ
Base64 Image Encoder
base64-image.de โ€บ home โ€บ tutorial
Tutorial - Base64 Image Encoder
Base64 encoded images also work perfectly as CSS background images. Simply use the url() function with the data:image/... format.
๐ŸŒ
OutSystems
outsystems.com โ€บ forums โ€บ discussion โ€บ 87490 โ€บ how-to-convert-image-uri-to-base64
How to convert image URI to base64. | OutSystems
April 15, 2023 - I want to store the base64 data of Image URI in a local variable. Can anyone come up with some idea how I can do it ยท There's nothing out-of-the-box that supports this. If you google a bit you'll find ways to do that with JavaScript, e.g. here
๐ŸŒ
npm
npmjs.com โ€บ package โ€บ image-to-base64
image-to-base64 - npm
Generate a base64 code from an image through a URL or a path.
      ยป npm install image-to-base64
    
Published: Apr 09, 2021
Version: 2.2.0
๐ŸŒ
Tick
pqina.nl โ€บ blog โ€บ convert-an-image-to-a-base64-string-with-javascript
Convert An Image To A DataURL or Base64 String Using JavaScript - Pqina
In this short tutorial we explore 3 different JavaScript methods to convert an image into a Base64 string. We look at converting a File object or Blob, a canvas element, and an image tag.
๐ŸŒ
Base64.Guru
base64.guru โ€บ home โ€บ base64 converter โ€บ base64 encode
URL to Base64 | Base64 Encode | Base64 Converter | Base64
To use it, just type or paste the URL and press โ€œEncode URL to Base64โ€ (make sure that the URL is publicly available). If you need more features, for better customization check the Base64 encoder. Please do not confuse this converter with the Base64URL Encode.
๐ŸŒ
Base64.Guru
base64.guru โ€บ converter โ€บ decode โ€บ image
Base64 to Image | Base64 Decode | Base64 Converter | Base64
Convert Base64 to image online using a free decoding tool which allows you to decode Base64 as image and preview it directly in the browser. In addition, you will receive some basic information about this image (resolution, MIME type, extension, size). And, of course, you will have a special link to download the image to your device.
๐ŸŒ
OpenAI Developer Community
community.openai.com โ€บ api
Use base64 encoded images or urls within prompts? - API - OpenAI Developer Community
August 6, 2024 - Would you recommend to encode images ... text: "Analyze this nutrition plan and suggest meals.", }, imageUrl ? { type: "image_url", image_url: ......