Do you need a file extension for an image/photo to work on a website
Disclaimer: I am brand new to the forum and I do not write code. However, I do have a question regarding coding: Does a photo coded into a website need an extension, such a .jpg, gif. etc. in order to display and work properly on a website? Or can a photo's file name be titled SUNSET, not have an extension, and will display and work properly? Is it possible to accidentally drag a photo from a website to your desktop that does not have a file extension as part of the file name? While I am writing in the HTML and CSS forum my question applies to all types of website coding formats, styles, program, etc.
I would greatly appreciate any help on the subject.