I am writing a small application which serves images from the local computer, so they can be accessed as http://localhost:12345/something/something (which returns a jpeg). <
You can't and nor should you - this is the user's decision to make not yours.
What you can do is strongly suggest with the right headers, but even then you should expect t deal with a number of HEAD requests ever after.