Problem statement There might be cases when you would be required to obtain metadata of a media before it is loaded. The usual way you would go about it is to have an API that gives back the media metadata from the server. But here we will be getting the image dimension using React.
Steps to solution Firstly, we will be creating an instance of the HTML Image element and then pass the image URL.
Thursday, Jan 14, 2021
By Prashant Shahi