When I try to insert an image into my Stack Overflow question with this link to an image hosted on LightShot (like this one) I got an error:
Is this not a valid way to upload and show my image? Which way is valid?
When I try to insert an image into my Stack Overflow question with this link to an image hosted on LightShot (like this one) I got an error:
Is this not a valid way to upload and show my image? Which way is valid?
Like @yivi said, you need the actual image URL, not the link to LightShot– but unfortunately, getting that link from LightShot appears to be very confusing, and not easily accessible.
You're looking for this URL:
https://img001.prntscr.com/file/img001/A_2g8dPASJWADWcVXJV7Fg.png
For a better experience in the future, you may want to find another way to capture screenshots without using LightShot (Especially since all images you upload with this service are publicly accessible, whether you intend them to be or not).
Using traditional means on the LightShot website, like attempting to copy the image address or open it in a new tab from a browser's context menu, just leads you back to the same page:
The only way I could obtain the actual URL for your image was by digging into the page's markup with browser dev tools to find the image's underlying source (underlined here in green):
Uploading that URL works just fine:
But that's a lot of work to dig up one image!
Like I said above, you probably want to find another way to capture and share screenshots, without using LightShot, that's more controllable, intuitive, and which doesn't allow anyone to view or scrape your uploaded screenshots by design.
You should use a direct link to an actual image.
The link you are using is a link to a webpage, with the image embedded.