can you make this script to also send post images in the email notification? here's the script:

import time
import requests
import msvcrt
import smtplib
import re
from email.mime.text import MIMEText
from email.mime.multipart import MIMEMultipart

def get_thread_posts(board, thread_id):
    url = f"https://a.4cdn.org/{board}/thread/{thread_id}.json"
    response = requests.get(url)
    if response.status_code == 200:
        data = response.json()
        return data["posts"]
    return None

def send_email(subject, message, sender_email, recipient_email):
    msg = MIMEMultipart()
    msg["From"] = sender_email
    msg["To"] = recipient_email
    msg["Subject"] = subject

    msg.attach(MIMEText(message, "plain"))

    with smtplib.SMTP("smtp.gmail.com", 587) as server:
        server.starttls()
        server.login(sender_email, "yhyktryesoxpnmun") # Enter your email password here
        text = msg.as_string()
        server.sendmail(sender_email, recipient_email, text)

def notify(reply_count, post, board, thread_id, recipient_email):
    post_content = post.get('com', 'No content').replace('<br>', '\n')
    post_content = re.sub('<a.*?>(.*?)</a>', r'\1', post_content)
    post_content = re.sub('<span.*?>(.*?)</span>', r'\1', post_content)
    post_content = re.sub('<[^<]+?>', '', post_content)
    post_content = post_content.strip()
    post_content = post_content.replace('&gt;', '>')
    post_content = post_content.replace('&#039;', "'")
    post_content = post_content.replace('&quot;', '"')
    post_link = f"https://boards.4channel.org/{board}/thread/{thread_id}#p{post['no']}"
    post_header = f"Post with {reply_count} replies ({post_link}):"
    message = f"{post_header}\n\n{post_content}"
    send_email("4chan Post Notifier", message, "yunus98y@gmail.com", recipient_email) # Enter your email here as the sender_email

def count_replies(posts):
    reply_count = {}
    for post in posts:
        com = post.get("com", "")
        hrefs = post.get("com", "").split('href="#p')
        for href in hrefs[1:]:
            num = int(href.split('"')[0])
            if num in reply_count:
                reply_count[num] += 1
            else:
                reply_count[num] = 1
    return reply_count

def monitor_thread(board, thread_id, min_replies, delay, recipient_email):
    seen_posts = set()
    print(f"Monitoring thread {board}/{thread_id} every {delay} seconds…")
    tries = 0
    while True:
        posts = get_thread_posts(board, thread_id)
        if posts:
            print("Checking posts for replies…")
            reply_count = count_replies(posts)
            for post in posts:
                post_id = post['no']
                replies = reply_count.get(post_id, 0)

                if replies >= min_replies and post_id not in seen_posts:
                    print(f"Found post with {replies} replies. Sending notification…")
                    notify(replies, post, board, thread_id, recipient_email)
                    seen_posts.add(post_id)

        time.sleep(delay)

if __name__ == "__main__":
    BOARD = "g"
    THREAD_ID = input("Enter thread ID to monitor: ")
    MIN_REPLIES = int(input("Enter minimum replies for notification: "))
    DELAY = int(input("Enter delay time in minutes: ")) * 60
    recipient_email = input("Enter email address to receive notifications: ")
    monitor_thread(BOARD, THREAD_ID, MIN_REPLIES, DELAY, recipient_email)