Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

image loading is not working properly in react

how to display image through online URL path in react ,if I try to do that code its not working

import React from 'react';
export default function Dropdown() {
return (
    <div>
    <img alt="picture"src="https://pixabay.com/photos/strawberries-fruit-season-eating-3359755/" 
    height={200} width={200}/>
    </div>
  );
}

>Solution :

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

It’ just that your source image is wrong. Try this:

import React from 'react';
export default function Dropdown() {
return (
    <div>
    <img alt="picture" src="https://cdn.pixabay.com/photo/2018/04/29/11/54/strawberries-3359755_960_720.jpg" height={200} width={200}/>
    </div>
  );
}
Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading