a function that select an image when we click the input field

PHOTO EMBED

Fri Sep 09 2022 02:06:52 GMT+0000 (Coordinated Universal Time)

Saved by @gerald30

const onImageChange = (event) => {
        if(event.target.files && event.target.files[0]) {
            let img = event.target.files[0];
            setImage({
                image: URL.createObjectURL(img),
            });
        }
    }
content_copyCOPY

this should worked in social media input field what's on your mind section by clicking it we can choose a file to upload

from ZAIKEEPSCODE social media project