Refresh an image on html page when it updates on memory

I am new to html and Flask, any help is much appreciated.

I have a html code where I am displaying two images which get updated regularly. I need to refresh those images every time they are saved/overwritten again. Here is the html code:

<!DOCTYPE html>
<html lang="en">
<head>
    <!-- include jQuery - better done in the head -->
    <script src="http://code.jquery.com/jquery-1.7.2.min.js"></script>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Stack of Images</title>
    <meta http-equiv="refresh" content="2">
</head>

<body>

    <img src="static/X.jpg" alt="Image 1" id = "img1" width="960" height="540">
    <img src="static/X_display.jpg" alt="Image 2" id = "img2" width="960" height="540">


</body>
</html>