to create an image data string you can use this: https://replit.com/@jupitersmoon/More-flask-testingwebsites-testing#templates/testing.html Just run the code with something like OneCompiler and upload any image you want! Note: Any images bigger than 500x500 will render outside of screen.