Is this link a picture?

http://ci.xiaohongshu.com/110...

Why not with suffixes like jpg,png

Apr.09,2022

browsers can recognize pictures without the suffix.
if you want to see how the picture is converted to base64, you can use FileReader to read the picture, and use readAsDataURL () to add the picture to base64 string directly to . The effect is the same.


the browser determines the file type without suffix


as long as the API returns a base64 string and the specified type is an image type, the URL will be like this.


look at this in Response Headers:

Content-Type: image/gif

this link requests an interface, and the interface returns this image.

Menu