Unable to display an image when clicked on a hypertext link

Hi!!
I’m new to Web Development. You can probably say that it’s Day 1 of my coding journey. There’s something I’m unable to understand. It would be nice if someone helps me out.

I’ve attached a link of screenshot & screen recording.
Please go through it.

Screenshot/Screen Recording

Can u pls tell me why the image is getting downloaded without the download attribute?

I thought it would display an image (in a new tab) when ‘My Photo’ is clicked but here it’s downloading. Can you please tell me why?

.jfif is quite an uncommon file extension. Rename the file with a .jpg or .jpeg extension to make it work as expected.

1 Like

Thank you. It worked. Earlier, I downloaded a random image from google and tried to use it without properly checking the extension.