Use data URI scheme to embed images in webpages

Source: Internet
Author: User

Data: [<MIME-type>] [; base64], <data>

The format is relatively simple. We can see that the above is a base64 encoded jpg image.
Embedded in this page, the following is displayed:

 

According to the above format, we can write a small program to generate, but we don't need to be so troublesome. Many websites provide this (free) service.

1. http://dataurl.sveinbjorn.org/dataurlmaker

Provides preview for convenient copying.

 

2. http://websemantics.co.uk/online_tools/image_to_data_uri_convertor/

Provides preview and generates the URI data of the corresponding CSS.

 

3. http://software.hixie.ch/utilities/cgi/data/data

Tip: generation is not limited to image data. You can use three methods (see steps 1, 2, and 3) to specify the encoding method, but the interface is unfriendly.

Click:

 

In the following window, use any of the above URLs to generate image data, copy and paste the data to the image address text box:

 

Click Insert. OK, for example:

View effects: http://space.cnblogs.com/group/topic/41938/

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.