I need to display an image on my HTML page but only if it exists on my computer (aka i give it a path and it checks). If it doesn't, then show nothing. How can I write a function that checks if the image exists, then if yes, display it if no, don't show anything? I am using django as a back end.
I think you should try os.path.exist