You may notice that some of the images on the Web page have src or CSS background images followed by a large string of characters.For example: Data:image/png;base64,
You may have noticed that the URLs of some SRC or CSS background images on the webpage are followed by a large string of characters, such as data: image/PNG and base64, release/keauffr0cbng3nqpw68arzdalozpppfibhh5eab8b + tlt9myq6i1buqfaq1cksvcxz2acs6
IMG SRC uses base64 image dataDisplaying a picture on a webpage is usually or But if we have image base64 data, we can also use Base64 data to display a picture on the webpage;Format:The above one is to note the picture format: Image/bmp, where you
Source: http://www.cnblogs.com/wang985850293/p/5287460.html
1, display img:
You may notice that some of the images on the Web page have src or CSS background images followed by a large string of characters, such as: Data:image/png;base64,
The example of this article is about how to display the PHP image in base64. Share to everyone for your reference, specific as follows:
Here the implementation of the picture as a string saved to the Web page, so that no longer need to load the
This is the data URI scheme defined in RFC2397, the purpose is to embed some small data directly into the Web page, so that no longer load from the external file, such as the string of characters above, is actually a picture, these characters are
PHP support for Base64 is very good, there is a built-in Base64_encode and Base64_decode responsible for the image of the Base64 encoding and decoding.On the encoding, as long as the picture stream is read, and then using Base64_encode to encode can
When realizing the function of Html2canvas, it is found that "picture cross-domain" is not supported, which is a headache;Accidentally found that if the "online picture resources" converted to Base64, with Base64 rendering, so that the perfect
Use base64 to improve visual experience and base64 to improve Visual Effects
Recently, I am working on a small project. After I finish writing the front-end code, I will test it on the mobile phone. It's okay, but the page loading and rendering
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.