I don’t know how the uploading front-end part is processed. If you are using HTML5 native, you should be able to use FileReader to convert the image to base64 when uploading, and then fill it in the src of the img tag for display, or use canvas to process it (mainly Compressed), and then output base64 for display. I personally recommend the latter, because if the image is large, there will be performance problems when converting to base64~
I got downvoted inexplicably... If you want to display it in the browser, whether it is the front or backend of the website, there must be front-end participation~ It is recommended to add the upload method.
I don’t know how the uploading front-end part is processed. If you are using HTML5 native, you should be able to use FileReader to convert the image to base64 when uploading, and then fill it in the src of the img tag for display, or use canvas to process it (mainly Compressed), and then output base64 for display. I personally recommend the latter, because if the image is large, there will be performance problems when converting to base64~
I got downvoted inexplicably... If you want to display it in the browser, whether it is the front or backend of the website, there must be front-end participation~ It is recommended to add the upload method.